What is Server Side Load Balancing in Microservice Architecture
In this tutorial we are going to learn about client Side Load Balancing in Microservice Architecture.
Server Side Load Balancing is a monolithic It applies between the client and the server. It accepts incoming network, application traffic, and distributes the traffic across the multiple backend servers by using various methods. The middle component is responsible for distributing the client requests to the server.
Advantages of server-side load balancing:
- Simple client configuration: only need to know the load-balancer address.
- Clients can be untrusted: all traffic goes through the load-balancer where it can be looked at.
- Clients are not aware of the backend servers.
Different types of load balancers:
- Software Load Balancers
A piece of a software that runs on a linux machine which will route through the different instances of the payment service.
Easy to deploy software load balancers in containers and carry around.
- Hardware Load Balancers
The dedicated servers which are in the form of racks and high-end processing systems which will redirect requests or routes the traffic only to these payment services or any other internally configured services.
These are dedicated and useful when we have internet facing applications where we need firewall request to route all our traffic to the internal routers.
Lets take a simple example of an booking application with a booking service that communicates with the payment gateway and we have multiple instances of payment services up and running.
The payment service connects to the third party applications through rest or rabbitMQ and there is one more service running i.e., account service which holds the user info that may be credit card information or any information related to customer.
Booking service communicates with both the payment service and account service, and account service communicates with the payment service.
Now there is two ways of doing the server side load balancing i.e., a software load balancer is embedded inside the service registry through which the booking service communicates with the payment service or else we can have a hardware in place as shown in the figure.
So this is all about server side load balancing and it totally depends on the requirement on using server side load balancing.