Learner, developer, coder and an exceptional omelet lover. Knows how to flip arrays or omelet or arrays of omelet.
Learner, developer, coder and an exceptional omelet lover. Knows how to flip arrays or omelet or arrays of omelet.
Markdown supported · ⌘↵ to post
Edge Ops
Gzip at the nginx edge in front of a static Angular build is usually worth it, but the ops trap is compressing twice or caching the wrong Content-Encoding. If a CDN or browser already negotiates br/gzip, turning gzip on indiscriminately at nginx without aligning Vary: Accept-Encoding burns CPU and can serve a gzip body to a client that asked for identity after a bad cache key.
I keep gzip on for text/css/javascript/json/svg at the edge, leave images and already-compressed assets alone, and put Vary Accept-Encoding on those responses so a HIT cannot mix encodings. After the Docker image ships I curl -I with and without Accept-Encoding: gzip and confirm Content-Encoding plus Content-Length both move as expected, then hit the same URL twice to see whether the edge cache (if any) stored one encoding only. Also watch worker CPU under a warm traffic replay — if gzip sits at level 9 for every asset, dial it down before blaming the Angular bundle size.