/api/usersLesson 5 · Selective scaling
One entry point. Extra capacity only where needed.
The API Gateway routes every request by path. User and Order go directly to one service, while the busier Catalog path goes through an L7 Load Balancer and reaches one of two replicas.
Interactive architecture lab
Compare a direct route with a scaled route.
Send User, Product, and Order requests through the same gateway. Only Product requests should enter the Load Balancer.
http://localhost:7512/api/users
Start the lesson, then execute a request.
Execute a request to inspect the original response.
Execute a request to inspect the response headers.
/api/users → User Service/api/products/api/ordersObserve the two decisions
Did this route need a Load Balancer?
The gateway always chooses a service. Only the Catalog route requires a second decision to choose a replica.
- 1Start the lessonThe trace will reveal whether the request needs one routing decision or two.
Start Lesson 5.
Only Catalog requests enter this node.
What this teaches
Scale only the services that need it.
We can use the API Gateway as the main entry point for all client requests. Not every service needs a Load Balancer, so we add one only in front of a service that receives high traffic or needs multiple instances.
API Gateway
Owns the external entry point, selects a service, and can centralize authentication, rate limiting, TLS termination, and API policies.
Load Balancer
Exists only on the scaled Catalog path and distributes Product requests between its healthy replicas.
Application Services
Focus on business logic while infrastructure components handle external routing and traffic distribution.
What this gives us
- One stable public API address
- Independent scaling per service
- No unnecessary Load Balancers
- Catalog traffic distributed across replicas
- Clear separation between service and instance selection
What still remains
- The single API Gateway remains a Single Point of Failure (SPOF)
- The Catalog Load Balancer is also one infrastructure instance
- User and Order still have one application instance each
- Gateway capacity cannot yet scale horizontally