In microservice architectures, clients (web/mobile apps) shouldn't talk directly to dozens of backend services. Instead, they hit a single entry point called the API Gateway.
The API Gateway is responsible for:
/api/v1/users or /api/v1/posts) and forwarding request queries to the correct microservice fleet.In the diagram, our API Gateway has rules configured:
/api/v1/posts maps to POST_SERVICE (balanced across Server 2 and Server 3)./api/v1/users maps to USER_SERVICE (balanced to Server 1).If a client requests an endpoint path that is not defined, or if the destination server doesn't expose it, the gateway handles routing validation and returns 404 Not Found or 405 Method Not Allowed.
Interactive Checkpoints:
Simulate Wrong Gateway Routing
LoadClick to point all posts routes to USER_SERVICE on Server 1. Watch how the gateway routes post requests to Server 1, causing endpoint mismatches.
Running1/0
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
No frames available