intermediate

Nginx basics

Use Nginx as a reverse proxy and static edge server while understanding TLS, compression, caching, limits, and buffering.

Nginx basics interviews test reverse proxy and static edge operation: upstream routing, TLS termination, compression, caching, rate limiting, and request buffering.

Subtopics: reverse proxy and static serving, load balancing and TLS termination, compression and caching, and rate limiting with buffering.

On interviews: sketch an nginx location block for API vs static files, explain upstream health expectations, and when proxy buffering protects Node from slow clients.

Common pitfalls: buffering large uploads without limits, cache keys that ignore auth, and TLS configs missing modern cipher and HSTS alignment.

The trade-off is balancing simplicity, performance, safety, and operability — name which axis you optimized and what cost you accepted.

Checklist:

  • Route by location with trusted forwarded headers.
  • Balance upstreams with connection reuse and timeouts.
  • Tune gzip/Brotli vs CPU for your payload sizes.
  • Protect upstreams with zones, bursts, and body limits.