Have you ever considered how to avoid bottlenecks in your systems? Microservices architecture becomes more popular every year. Companies creates a lot of microservices with multiple instances to provide availability and scalability. But very often people forget about Load Balancing in this approach. Successfully adopting microservices architecture requires a perfect load balancing to ensure that all incoming requests will reach their destinations.
As we know most popular approach in load balancing is server side load balancing we all incoming requests goes through Load Balancer:
This approach cause that we have single point of failure: Load Balancer. In case of Load Balancer problems requests will not reach destinations – we can say that microservices becomes monolith 😉
To avoid these problems, we suggest using something called Client Side Load Balancing.
In this approach load balancing is fully distributed because each client keeps routing data by its own. How it works? Every client will call Service Registry in some period of time to update routing data. After this every request to microservice is send directly by client based on routing table cached inside this client.