Where To Use What
CDN vs Load Balancer vs API Gateway vs Proxy — when you need each, with real architecture scenarios from static sites to microservices.
Load Balancer
Where to Use What?: System Design
Question : Do you need all of them?
CDN = Reverse Proxy + caching + edge distribution + other features API Gateway = Reverse Proxy specialized for APIs + auth + rate limiting + routing + API policies + distribute request L7 Load Balancer = Reverse Proxy + HTTP understanding + distribute request L4 Load Balancer = Distribute Connection + no HTTP understanding
1. static Website
Small application with multiple servers
L7 Load Balancer
GET /products
POST /checkout
Big application with multiple servers
Authentication
Rate limiting
Request transformation
API-specific routing
Version management
Logging / policies
Big application with multiple servers and microservices
Organization - Website
Reverse Proxy
Forward Proxy
Amazon-style public website
Live Streaming
Streaming Servers
put that data to cdn