Load Balancers, Reverse Proxies, and CDNs

A forward proxy acts on behalf of clients; a reverse proxy accepts requests for servers and forwards them to backends. A load balancer distributes traffic across healthy targets. These roles can overlap in one product but remain conceptually different.

Layer 4 balancing uses transport-level information such as IP addresses and ports. Layer 7 balancing can route using HTTP paths, hostnames, headers, cookies, or other application data. Health checks should test meaningful readiness, not merely whether a process has opened a port.

A content delivery network caches eligible assets near users. Cache-control headers determine whether content can be cached and for how long. Private or personalized responses require careful cache keys and directives; a misconfigured shared cache can leak one user's response to another.

Request path through an edge layer
Key Takeaways
  • Reverse proxies centralize routing and edge concerns.
  • Health checks need to reflect readiness accurately.
  • Cache configuration is both a performance and data-isolation concern.