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 Nginx and Consul

So far we have learned how to load balance our microservice using Zookeeper and Consul. Both of these approaches come with their own merits and demerits. The Zookeeper approach required us to write a lot of code, and there is still a possibility of race condition where our proxy controller could invoke a service that just went down. The Spring Cloud Consul approach required us to write the proxy controller. In fact, in both these approaches we had to write our own load balancer microservice. This might not be a scalable approach when you have hundreds of microservices and tons of APIs. That is where HTTP servers such as Apache HTTP Server and Nginx come to the rescue. Nginx is one of the ...

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