In chapter 3, we introduced the API Gateway architectural pattern and discussed its applicability in a microservices deployment. Zuul is an open source API gateway developed by Netflix to proxy all its microservices. Zuul provides dynamic routing, monitoring, resiliency, security, and more. It acts as the front door to Netflix’s server infrastructure, handling traffic from Netflix users around the globe.
We also discussed in chapter 3 how to enforce security based on OAuth 2.0 for your microservices, using Zuul as the API gateway. In this chapter, we extend those samples to use Zuul to handle throttling and apply access-control policies, and we also discuss the monitoring aspects of a microservices deployment.
In this section, we discuss the types of threats a typical microservices deployment is exposed to by allowing too many requests within a particular time frame, and why it is important to throttle requests. Take a look at figure 5.1 to refresh your memory from chapter 3 on the participants of an API Gateway architecture pattern.