Load Balancer in system designed.
Load balancing is the method of distributing network traffic equally across a pool of resources(server) that support an application.
A load balancer is a device that sits between the user and the server group and acts as an invisible facilitator, ensuring that all resource servers are used equally.
Benefits of load Balancer.
Application availability:-Server failure will cause our application unavailable to user, This failure can be overcome by use of load balancer as it will act as a fault tolerance(by redirecting the user request to different available server).
Application scalability:-load balancer will divide number of request and send them to multiple available server, which will prevent traffic bottlenecks at any one server.
Application security :- Previously when their is no load balancer client are directing request to the server. But after introduction will pass thought the load balancer before going to the server.
load balancer also provide security as it can monitor all the request so it can block the malicious request.
load balancer increase performance by reducing latency(time to perform some action),as it will send the request to geographically closer server.
#LOAD BALANCER ALGORITHM.
The set of rules that are follows by load balancer to determine the best server among all the server for different client request.
1.Static load balancing algorithm:-These are the fixed rules irrespective of the current server state.
Example of static load balancer are Round-robin method, weighted round-robin method, IP hash method.
a. Round-robin method:- the server has the IP address which tell the user where to send the request, but it is very hard to remember all these IP address so name are given to these IP, and name-IP server is used which use to provide IP of the name of the domain, so this IP-NAME server act as as a Load balancer instead of any specialized hardware or software.
b. weighted round-robin method:-
we can assigned weight to each server based on their priority or capacity.
c. IP hash method:-
load balancer will perform a mathematical computation called hashing on client IP address and convert that IP into a number which is then mapped to individual server.
2.Dynamic load balancing:- it examine the current state of the servers before distributing traffic.
a. Least connection method:-send request to the server having less active traffic.
b. Weighted least connection method:-In this some server can handle more traffic then other means having high capacity so send the request to the server having least connection by capacity.
c. Least response time method:- in this load balancer will send the request to the server having least response time.
#Type of load balancing technique:-
1.Hardware load Balancing.
2.software load balancing.
Hardware load Balancer:-it is a hardware appliance that can securely process and redirect gigabyte of request to different server.
Software load Balancer:-it is a software application that can perform all load balancer functionality.
#Layer 4 And Layer7 load balancer.
load balancer are divided into 2 categories Layer4 and layer7 as per OSI Model. we have to decide which one would be better for our case.
Layer 4 (Transport Layer) Load Balancer:-delivering the message with respect of the content of the message.
advantages:-
1.Quick and efficient because it does not take data into account.
2.As data is not examined so it is more secured.
3.It just forward the packet no need to decrypt the packet.
4.Maintains only one NAT connection between the client and the server, allowing your load balancer to serve a maximum number of TCP connections.
Layer7 (Application layer)Load Balancer.
1.it is in charge of the message actual content
2.it offer Caching.
Service Manager
1 年Thank you for sharing Chirag!
Software Engineer at @NucleusTeq || ex- LTIMindtree Java || Spring boot || Microservices
1 年Thanks for sharing
SE @ Engineers India limited|| ex-Samsung ||Jamia CSE'22
1 年Great article and an informative one .