Using Netflix Zuul As a Reverse Proxy / API Gateway

Home » Blog » Software » Enterprise Software » Using Netflix Zuul As a Reverse Proxy / API Gateway

Zuul, which like the service discovery tool Eureka and the fault tolerance library Hystrix is part of Netflix’ cloud orchestration stack, is a reverse proxy / API gateway.

A reverse proxy conceptually works like this:

A reverse proxy allows you to route requests to a single domain to multiple backing services behind that proxy. This can be conducive in situations where you want to break up your application into several loosely-coupled components that externally, that is facing the user, nonetheless act as if they were one single application, quite possibly including a single sign-on mechanism.

Like the other parts of the Netflix stack Zuul works exceptionally well together with Spring Cloud and Spring Boot. It’s a toolkit that allows to treat reverse proxy infrastructure as code.

To help others getting started with this useful tool I’ve put together a Zuul demo with Spring Boot that exemplifies some simple reverse proxy use cases and how to implement them with Zuul.

The various filters and the test code verifying these probably are particularly interesting because they show how to implement common patterns such as enriching or modifying HTTP request and response headers at different stages of the HTTP request-response cycle.

This article from the Zuul wiki illustrates Zuul filters and the Zuul lifecycle in more detail.

Leave a Comment

* Checkbox GDPR is required

*

I agree

By continuing to browse the site you agree to our use of cookies. Privacy Policy

Privacy Preference Center

Strictly necessary

These cookies are necessary for the site to function.

PHPSESSID: Preserves user session state across page requests.

__cfduid: Used by the content network, Cloudflare, to identify trusted web traffic.

PHPSESSID
__cfduid

Preferences

Remembers the user's submitted data when a comment is submitted in a blog post. The purpose is to aut o-populate form fields for subsequent comments, in order to save time for the user.

wfvt_#

Statistics

Statistic cookies help us to understand how visitors interact with our websites by collecting and reporting information anonymously.

_ga: Registers a unique ID that is used to generate statistical data on how the visitor uses the website.

_gat: Used by Google Analytics to throttle request rate.

_gid: Registers a unique ID that is used to generate statistical data on how the visitor uses the website.

collect: Used to send data to Google Analytics about the visitor's device and behaviour. Tracks the visitor across d evices and marketing channels.

_ga,_gat,_gid
collect

Security

We use Wordfence to secure our website against hacking attempts: https://www.wordfence.com/

wordfence_verifiedHuman

Close your account?

Your account will be closed and all data will be permanently deleted and cannot be recovered. Are you sure?