DEV Community

Said Olano
Said Olano

Posted on

Zuul Proxy / Api gateway

Zuul Server is a gateway application that handles all the requests and does the dynamic routing of microservice applications. The Zuul Server is also known as Edge Server.

For Example, /api/user is mapped to the user service and /api/products is mapped to the product service and Zuul Server dynamically routes the requests to the respective backend application.

For Zuul routing, add the below properties in your application.properties file or application.yml file.

Image description

This means that http calls to /api/demo/ get forwarded to the products service. For example, /api/demo/products is forwarded to /products.

yaml file users can use the application.yml file shown below

Image description

Note − The http://localhost:8080/ application should already be running before routing via Zuul Proxy.

Zuul is the front door for all requests from devices and web sites to the backend of the Netflix streaming application. As an edge service application, Zuul is built to enable dynamic **routing, monitoring, resiliency and security. **It also has the ability to route requests to multiple Amazon Auto Scaling Groups as appropriate.

The volume and diversity of Netflix API traffic sometimes results in production issues arising quickly and without warning. Zuul uses a range of different types of filters that enables us to quickly and nimbly apply functionality to our edge service. These filters help us perform the following functions:

Authentication and Security - identifying authentication requirements for each resource and rejecting requests that do not satisfy them.

Insights and Monitoring - tracking meaningful data and statistics at the edge in order to give us an accurate view of production.

Dynamic Routing - dynamically routing requests to different backend clusters as needed.

Stress Testing - gradually increasing the traffic to a cluster in order to gauge performance.

Load Shedding - allocating capacity for each type of request and dropping requests that go over the limit.

Static Response handling - building some responses directly at the edge instead of forwarding them to an internal cluster

Multiregion Resiliency - routing requests across AWS regions in order to diversify our ELB usage and move our edge closer to our members

Top comments (0)