Using Spring Cloud Netflix Zuul

Spring Cloud has implemented an embedded Zuul proxy to allow frontend application's proxy calls to backend services. This feature is useful for external clients, because it hides system complexity and helps to avoid the need to manage CORS and authentication concerns independently for all microservices. To enable it, you should annotate a Spring Boot main class with @EnableZuulProxy, and this forwards incoming requests to the target service. Of course, Zuul is integrated with the Ribbon load balancer, Hystrix circuit breaker, and service discovery, for example with Eureka. 

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.