nginx proxy cache를 사용할 때 STALE이라는 상태값을 받을 때가 있다.
stale이란 '신선하지 않은' 이라는 뜻으로, 응답이 정상적이지 않을 때, 이미 저장되어 있는 캐시를 대신 응답한다는 것을 의미한다.
어떤 경우에 STALE을 사용할지는 nginx.conf에서 설정할 수 있다.
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_cache_use_stale은 default off이기 때문에 stale인 케이스를 정의하고 싶다면 설정값을 입력만 하면 된다.
공식 문서는 여기
https://www.nginx.com/blog/nginx-caching-guide/#stale
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_use_stale
'개발' 카테고리의 다른 글
nginx 정규식 regex args에 변수명 설정하기 (variable capture) (0) | 2022.07.21 |
---|---|
Jmeter - jmx 파일 바로 열 수 있게 설정하기 (0) | 2022.06.10 |
Jmeter 설치하기 (0) | 2022.06.10 |
M1 맥북 모니터 연결시 멈춤 현상 (0) | 2022.05.24 |
스레드 덤프 뜨는법 (0) | 2022.05.24 |