Roadmap › Networking & Hosting — How a Website Works, End to End › Module: Infrastructure Between the User and the App
Lessons in this course (12)
8. Proxies, reverse proxies, load balancers, CDNs and firewalls
Intermediate★ Must knowLesson 8 of 12
| Component | Sits | Does |
|---|---|---|
| Forward proxy | Near the client | Clients go out through it (corporate filtering, caching) |
| Reverse proxy | In front of servers | Receives client requests and forwards to backend servers: TLS termination, compression, caching, routing (Nginx, IIS ARR, YARP, Azure Application Gateway) |
| Load balancer | In front of a server pool | Distributes traffic: round robin, least connections, IP hash; health probes remove dead servers. L4 (TCP) or L7 (HTTP) |
| CDN | Edge locations worldwide | Caches static (and some dynamic) content close to users: Cloudflare, Azure Front Door, Akamai, CloudFront |
| Firewall / NSG | Network boundary | Allows/blocks by IP/port |
| WAF | Layer 7 | Blocks SQL injection, XSS, bots (Azure WAF, Cloudflare WAF) |
| API gateway | In front of APIs | Auth, rate limiting, routing, versioning (Azure API Management) |
text
User ─▶ DNS ─▶ CDN/WAF (edge) ─▶ Load balancer ─▶ [Web server 1 | Web server 2 | Web server 3] ─▶ SQL ServerBehind a proxy the app sees the proxy's IP — read the original client IP and scheme from X-Forwarded-For / X-Forwarded-Proto (ASP.NET Core: UseForwardedHeaders).