프로그램 사용/squid2019. 3. 1. 10:16

결과 코드들에 대해서 좀 더 자세히 나와있는데..

그래도 HIER_DIRECT를 어떻게 할 방법이 없나..


6.7 Squid result codes

The TCP_ codes refer to requests on the HTTP port (usually 3128). The UDP_ codes refer to requests on the ICP port (usually 3130). If ICP logging was disabled using the log_icp_queries option, no ICP replies will be logged.


The following result codes were taken from a Squid-2, compare with the log_tags struct in src/access_log.c:


TCP_HIT

A valid copy of the requested object was in the cache.


TCP_MISS

The requested object was not in the cache.


TCP_IMS_HIT

The client issued an IMS request for an object which was in the cache and fresh.


TCP_SWAPFAIL_MISS

The object was believed to be in the cache, but could not be accessed.


TCP_NEGATIVE_HIT

Request for a negatively cached object, e.g. "404 not found", for which the cache believes to know that it is inaccessible. Also refer to the explainations for negative_ttl in your squid.conf file.


TCP_MEM_HIT

A valid copy of the requested object was in the cache and it was in memory, thus avoiding disk accesses.


TCP_DENIED

Access was denied for this request.


TCP_OFFLINE_HIT

The requested object was retrieved from the cache during offline mode. The offline mode never validates any object, see offline_mode in squid.conf file. 

[링크 : http://www.comfsm.fm/computing/squid/FAQ-6.html#ss6.7]


6.10 Hierarchy Codes

The following hierarchy codes are used with Squid-2:


NONE

For TCP HIT, TCP failures, cachemgr requests and all UDP requests, there is no hierarchy information.


DIRECT

The object was fetched from the origin server. 

[링크 : http://www.comfsm.fm/computing/squid/FAQ-6.html#ss6.10]

'프로그램 사용 > squid' 카테고리의 다른 글

squid hierarchy  (0) 2019.03.14
squid url_rewrite_program  (0) 2019.03.14
squid hier/none direct 관련 설정  (0) 2019.02.27
squid용 인증서 관련 (인증서 변환하기)  (0) 2019.02.25
HSTS-HTTP Strict Transport Security / squid  (0) 2019.02.25
Posted by 구차니
프로그램 사용/docker2019. 2. 28. 15:51

현재 컨테이너의 상세 정보를 확인하는 용도

(컨테이너에 할당된 볼륨의 경로라던가)


[링크 : https://www.joinc.co.kr/w/man/12/docker/Guide/DataWithContainer]

[링크 : https://docs.docker.com/engine/reference/commandline/inspect/]

[링크 : http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter20/14]

'프로그램 사용 > docker' 카테고리의 다른 글

docker cassandra selinux  (0) 2019.03.20
centos docker compose iptable error  (2) 2019.03.20
docker 복원하기  (2) 2019.02.27
docker 개념 다시 조사..  (0) 2019.02.01
docker 설명..  (0) 2019.02.01
Posted by 구차니
프로그램 사용/docker2019. 2. 27. 22:20

container의 내용을 저장하고 복구하는 방법


commit 으로 저장하고

save로 파일로 저장하고

load로 파일에서 불러와 복원한다


라는데 db도 되려나?


[링크 : https://blog.naver.com/chandong83/221006388637]

'프로그램 사용 > docker' 카테고리의 다른 글

centos docker compose iptable error  (2) 2019.03.20
docker inspect  (0) 2019.02.28
docker 개념 다시 조사..  (0) 2019.02.01
docker 설명..  (0) 2019.02.01
docker run = create + start  (0) 2019.02.01
Posted by 구차니
프로그램 사용/squid2019. 2. 27. 20:36

퇴근길에 검색하다가 우연히 발견한 문서

squid에서 HIER/NONE 이라고 뜨는 녀석은 캐싱이 안되는데

기본값으로 원래 서버로 요청을 돌려주도록 되어 있다고 한다.


parent가 누굴 지칭하는지 모르겠지만 global hit rate에는 영향을 못 미치면서 latency만 늘어난다라...


#  TAG: nonhierarchical_direct

# By default, Squid will send any non-hierarchical requests

# (matching hierarchy_stoplist or not cachable request type) direct

# to origin servers.

#

# If you set this to off, then Squid will prefer to send these

# requests to parents.

#

# Note that in most configurations, by turning this off you will only

# add latency to these request without any improvement in global hit

# ratio.

#

# If you are inside an firewall then see never_direct instead of

# this directive.

#

#Default:

# nonhierarchical_direct on 

[링크 : http://www.squid-cache.org/mail-archive/squid-users/200203/att-0514/squid.conf]


+

캐시 hierarchy 라는게 있어서 찾아보기..

[링크 : https://wiki.squid-cache.org/Features/CacheHierarchy]


+

헐?

[링크 : http://www.squid-cache.org/Doc/config/offline_mode/]

[링크 : https://stackoverflow.com/.../how-can-squid-be-configured-to-cache-all-downloaded-files]

'프로그램 사용 > squid' 카테고리의 다른 글

squid url_rewrite_program  (0) 2019.03.14
squid log code  (0) 2019.03.01
squid용 인증서 관련 (인증서 변환하기)  (0) 2019.02.25
HSTS-HTTP Strict Transport Security / squid  (0) 2019.02.25
squid as transparent proxy  (0) 2019.02.19
Posted by 구차니
프로그램 사용/apache2019. 2. 27. 12:54

virtualhost 라는 기능으로 구현이 가능한데..

웹 서버에서 하는건가? haproxy나 squid로 안되는걸려나? ㅠㅠ


[링크 : https://mynewparadigm.tistory.com/entry/1개의-ip로-2개의-도메인을-연결하는-방법]

[링크 : https://blog.readiz.com/29]

[링크 : https://hudi.kr/node-js-node-js-에서-vhost-사용/]


+

기본적으로 이 기능은 L4 에서 작동하는 것으로

apache / nginx / node.js 등에서 설정이 가능하다.

[링크 : https://stackoverflow.com/...-host-multiple-node-js-sites-on-the-same-ip-server-with-different-domain]

[링크 : https://www.joinc.co.kr/w/man/12/Nginx/virtualhost]

[링크 : https://gist.github.com/jakebellacera/590803]

[링크 : https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/]

'프로그램 사용 > apache' 카테고리의 다른 글

lets enceypt apache  (0) 2024.04.22
apache2 HSTS 활성화 하기  (0) 2024.04.18
mod_rewrite 테스트..  (4) 2017.04.12
mod_rewrite 로그설정  (0) 2017.04.12
라즈베리 파이 mod_rewrite 활성화  (0) 2017.04.11
Posted by 구차니

reverse proxy 돌리면..

공유기 안에서도 정상적으로 로그를 받을 수 있을려나?


[링크 : https://serverfault.com/questions/326837/iptables-nat-port-fowarding-and-apache-log-ips]

Posted by 구차니
프로그램 사용/squid2019. 2. 25. 12:25

생각해보니 뻘짓 한 듯..

그나마 도움이 된건 각종 인증서를 변환하는 방법을 찾은 것?

[링크 : https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-apache-for-centos-7]

[링크 : https://www.securesign.kr/guides/SSL-Certificate-Convert-Format]




pem to crt

해보니까 이전에 생성하던 der 이랑 동일한 내용

$ openssl x509 -outform der -in your-cert.pem -out your-cert.crt

[링크 : https://stackoverflow.com/questions/13732826/convert-pem-to-crt-and-key]


pem to key

$ openssl rsa -outform der -in private.pem -out private.key

[링크 : https://stackoverflow.com/questions/19979171/how-to-convert-pem-into-key]


[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=6979614]

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=19365977]

Posted by 구차니
프로그램 사용/squid2019. 2. 25. 09:37

+

2019.02.28

HSTS는 HTTP Strict Transport Security 약자로

간단하게 요약하면 HTTP로 접속하면 강제로 HTTPS로 전환하는 그런류의 기술 인 듯?


+

2019.02.28

youtube 캐시하는걸 해보려는데 HSTS 오류 어쩌구 떠서(크롬에서) 찾아보는데

역시 뻘짓 한 듯... HTTP -> HTTPS 하면서 보안 강화한 상황이라

그 이전의 유튜브 캐싱에 대한 내용들로 열심히 삽질하는 듯..


[링크 : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security]

[링크 : https://blog.geun.kr/158]

[링크 : https://blog.lael.be/post/6670]

[링크 : chrome://net-internals/#hsts]


[링크 : https://www.thesslstore.com/blog/clear-hsts-settings-chrome-firefox/]

[링크 : https://support.opendns.com/...-Chrome-for-Windows-only-HSTS-Certificate-Exception-Instructions]

[링크 : https://rsec.kr/?p=315]

[링크 : https://blog.lael.be/post/6670]

Posted by 구차니

다음 인코더 등에서 2PASS , 1PASS 설정하는게 있었는데

특별한게 아니라(?) H.264 인코더에서 제공하는 기본적인 기능이었네?


아무튼 2PASS의 경우 1PASS에서는 비트레이트를 어떻게 할지 분석하고(아마도 화면 바뀌는 순간 등을 확인하는 듯)

2PASS에서 실질적인 인코딩을 진행한다고 한다.


ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null && \

ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k output.mp4

[링크 : https://trac.ffmpeg.org/wiki/Encode/H.264]

Posted by 구차니

-c:a copy를 통해 오디오는 손대지 않고(AAC 같은건 못 건드리네.)

비디오만 비트레이트 변경할 수 있다.


$ ffmpeg -i viedeo.mp4 -b:v 2M -maxrate 2M -bufsize 1M  -c:a copy video_low.mp4 

[링크 : https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate]

[링크 : https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats]

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

webm을 mp3로 변환하기  (0) 2020.04.01
ffmpeg h264 encoding 옵션  (0) 2019.02.22
ffmpeg 레이턴시 관련 옵션 조사  (0) 2018.12.16
ffmpeg / ffplay cli interactive interface  (0) 2018.11.30
ffmpeg concat  (0) 2018.11.05
Posted by 구차니