Skip to Content
Mastering Spring Cloud
book

Mastering Spring Cloud

by Piotr Mińkowski
April 2018
Intermediate to advanced content levelIntermediate to advanced
432 pages
10h 38m
English
Packt Publishing
Content preview from Mastering Spring Cloud

Static load balancing configuration

Our order-service has to communicate with all other microservices from the example to perform the required operations. So, we need to define three different Ribbon clients with network addresses set using the ribbon.listOfServers property. The second important thing in the example is to disable discovery services in Eureka, which are enabled by default. Here are all the defined properties for order-service inside its application.yml file:

server: port: 8090account-service: ribbon:   eureka:     enabled: false   listOfServers: localhost:8091customer-service: ribbon:   eureka:     enabled: false   listOfServers: localhost:8092product-service: ribbon:   eureka:     enabled: false   listOfServers: localhost:8093

We should include ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781788475433Supplemental Content