O'Reilly logo

Microservices Deployment Cookbook by Vikram Murugesan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Load balancing your microservice using Spring Cloud Consul

So far in this chapter, we've learned how to set up Consul and then learned how to implement service discovery in Consul using Spring Cloud Consul. Now, your other services can discover the geolocation service with the help of Consul. Earlier, we talked about how significant load balancing is and how we can do it using Zookeeper. In this recipe, we will learn how to perform load balancing using Consul with the help of Spring Cloud Consul.

Getting ready

There may be scenarios where one microservice would want to invoke another microservice's REST API. What if the target microservice is load-balanced using Consul? That is exactly what we are going to demonstrate in this recipe. We will be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required