August 2018
Intermediate to advanced
372 pages
9h 29m
English
Ribbon is a client-side, load balancing solution that has a smooth integration with the Spring Cloud ecosystem. It can consume a service that is exposed using Eureka simply by specifying the service name. Since all the server instances are registered in Eureka, it will choose one of them to execute the request.
Let's say we have another service named cinema-service. Say that this service has an endpoint that can be used to query a cinema by its ID. As part of the cinema payload, we want to include all the movies that are available in the movies-service.
First of all, we need to add the following dependency:
compile('org.springframework.cloud:spring-cloud-starter-netflix-ribbon')
Then, as part of the application class, we need ...
Read now
Unlock full access