Concepts/2. Compute & Scaling/Reverse Proxy (NGINX / Envoy)
🛡️
2. Compute & ScalingBeginner

Reverse Proxy (NGINX / Envoy)

← All 150+ Concepts

An intermediary proxy server that sits in front of web servers to terminate TLS, compress payloads (Brotli/Gzip), cache responses, and hide internal network topologies.

STAFF ENGINEER TAKEAWAY: Reverse proxies face the internet to protect servers; Forward proxies face clients to protect internal enterprise users.
🔄

Reverse Proxy Ingress Pipeline

1
Public Internet
Sends TLS 1.3 ClientHello
✓
2
Reverse Proxy
Terminates TLS & checks rate limit
✓
3
Cache Evaluation
Cache MISS -> forwards upstream
✓
4
Internal Pod
Receives decrypted HTTP/2 request
✓
✓ ARCHITECTURAL ADVANTAGES

Centralizes SSL cert renewals, rate limiting, and static file caching.

✗ TRADE-OFFS & COMPLEXITIES

Misconfiguration can cause security leakage or header strip errors.

🏢

Production Systems Leveraging This Pattern

⚡NGINX⚡Envoy Proxy⚡Traefik⚡Caddy
Simulate in Visual Canvas→Read 30-Chapter Curriculum→

More Topics in 2. Compute & Scaling

📈Vertical vs Horizontal Scaling

Vertical scaling upgrades a single node (CPU/RAM). Horizontal scaling adds stateless worker nodes across an autoscaling pool behind a load balancer.

⚖️Load Balancing (Layer 4 vs Layer 7)

Distributes incoming client requests across a pool of backend servers using algorithms like Round Robin, Least Connections, and IP Hash.

🚪API Gateway Pattern

Single unified gateway entry point for microservices that handles JWT verification, rate limiting, protocol translation (REST to gRPC), and request routing.

🍩Consistent Hashing & Virtual Nodes

Maps keys and nodes onto a circular hash ring [0, 2^32 - 1]. Adding or removing a node only redistributes K/N keys rather than re-indexing the entire database cluster.