{"id":7260,"date":"2012-10-25T14:59:06","date_gmt":"2012-10-25T05:59:06","guid":{"rendered":"http:\/\/fukata.org\/?p=7260"},"modified":"2017-08-11T23:03:31","modified_gmt":"2017-08-11T23:03:31","slug":"nginx-proxy_cache-gzipped-contents","status":"publish","type":"post","link":"https:\/\/blog.fukata.org\/archives\/7260\/","title":{"rendered":"[nginx]proxy_cache\u3067gzip\u6e08\u307f\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b"},"content":{"rendered":"

nginx + proxy_cache\u306e\u5a01\u529b\u306f\u51c4\u307e\u3058\u304f\u3001\u307b\u3068\u3093\u3069\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u307e\u3067\u30a2\u30af\u30bb\u30b9\u304c\u884c\u304b\u306a\u304f\u306a\u308b\u3053\u3068\u3082\u3042\u308b\u306e\u3067\u3001proxy_cache\u304c\u4f7f\u3048\u308b\u72b6\u6cc1\u306a\u3089\u975e\u5e38\u306b\u6709\u52b9\u306a\u624b\u6bb5\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u4eca\u56de\u306f\u3001proxy_cache\u306f\u3057\u3066\u3044\u308b\u3051\u3069\u3001\u30da\u30fc\u30b8\u306e\u5bb9\u91cf\u304c\u5927\u304d\u304f\u8ee2\u9001\u91cf\u3082\u6e1b\u3089\u3057\u305f\u3044\u3068\u3044\u3046\u5834\u5408\u306egzip\u5727\u7e2e\u306e\u8a71\u3067\u3059\u3002<\/p>\n

\u30ea\u30af\u30a8\u30b9\u30c8\u6bce\u306bgzip\u5727\u7e2e\u306e\u51e6\u7406\u304c\u884c\u308f\u308c\u3066\u3057\u307e\u3063\u3066\u304a\u308a\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u6570\u304c\u591a\u5927\u306b\u306a\u3063\u3066\u304f\u308b\u3068cpu\u30ea\u30bd\u30fc\u30b9\u3092\u98df\u3063\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3069\u3046\u305bgzip\u5727\u7e2e\u3059\u308b\u3093\u3060\u3063\u305f\u3089\u305d\u308c\u3054\u3068proxy_cache\u3057\u3061\u3083\u3048\u3070\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u601d\u3044\u3001\u8a2d\u5b9a\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u305f\u306e\u3067\u8a2d\u5b9a\u3092\u66f8\u3044\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

<\/p>\n

\u76ee\u6307\u3059\u69cb\u6210<\/h2>\n
Internet -> [nginx(LB)] -> [nginx(RPX) -> app]<\/pre>\n

\u3053\u308c\u306e\u3001RPX\u306e\u90e8\u5206\u3067gzip\u51e6\u7406\u3092\u884c\u3044\u3001LB\u306e\u65b9\u3067\u306f\u305d\u306e\u5185\u5bb9\u3092proxy cache\u3057\u3066\u914d\u4fe1\u6642\u306b\u6539\u3081\u3066gzip\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001proxy cache\u3057\u305f\u5185\u5bb9\u3092\u8fd4\u3059\u3002<\/p>\n

\u203b[]\u306f\u30b5\u30fc\u30d0\u306e\u5358\u4f4d<\/p>\n

nginx.lb.conf<\/h2>\n