When you develop applications in a microservices architecture, it is often required to route API requests to the respective service(s). Doing this with a general-purpose load balancer like Nginx or Apache was the practice before, but it takes some control away from the application. Also, it is important to remember that maintaining an API-Gateway service brings you more benefits other than load balancing like below.
- Authentication and Security
- Monitoring
- Dynamic Routing
- Static Response handling
- Rate limiting
You can implement all the above features with Spring Boot + Zuul, but this article will only cover how to create your first API-Gateway application. Let's start with an example.