Lessons in this course (14)

4. Load balancing and API gateways

Intermediate★ Must knowLesson 4 of 14

Clients → DNS (can balance across regions: Azure Traffic Manager/Front Door) → load balancer (L4 or L7) → service instances. Algorithms: round robin, least connections, consistent hashing (sticky by user/key), weighted. Health checks remove failed instances. Load balancers themselves are redundant (active-passive pairs or managed cloud services).

An API gateway adds authentication, rate limiting, request routing to microservices, response aggregation and API versioning (Azure API Management, YARP, Kong).