Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.93 KB

caching-reverse-proxy.md

File metadata and controls

44 lines (35 loc) · 1.93 KB
title layout
Reverse proxy cache
default

Reverse proxy cache

This document is about caching content on the proxy server to which all intranet machines are connected to. This allows to avoid processing already processed requests on machines.

For example, If a static homepage was rendered for user A then there is no need to render it again for the next user B. Just take it from the cache.

Resources

proxy_buffering on;
  proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=edge-cache:10m inactive=20m max_size=1g;
  proxy_temp_path /var/cache/nginx/tmp;
  proxy_cache_lock on;
  proxy_cache_use_stale updating;
  proxy_bind 0.0.0.0;
  proxy_cache_valid 200 302 10m;
  proxy_cache_valid 301      1h;
  proxy_cache_valid any      1m;

  upstream origin {
    server origin.unified-streaming.com:82;
    keepalive 32;
  }