The directive is widely emitted and unevenly honoured, and nginx needs its own configuration rather than reading the response header. proxy_cache_lock is the piece that prevents a stampede…
A slow endpoint returning a 504 through nginx has three different timeouts that could be responsible, and they are configured by different directives. The distinction between a 502…
Rate limiting at the web server is cheaper than in the application and protects the endpoints the application never gets to serve. burst without nodelay queues the excess…
A front-controller pattern written with if and rewrite works and is slower and harder to reason about than the two-line version. try_files is a single directive evaluated once,…
A percentage-based canary needs a load balancer that supports weighting; a header-based one needs an nginx map and works anywhere. Deciding on a header means the team can…
A cache that expires and then blocks every waiting request on one slow origin fetch is a cache that makes the worst moment worse. proxy_cache_lock alone removes the…
A heredoc expands variables and command substitutions by default, which is convenient for a template and disastrous for anything containing a dollar sign belonging to another language. One…