Introduction of Load Balancer with example
In this
article we learn what is load balancer, feature of load balancer and different
type of algorithms used by a load balancer to distribute load traffic to the
backend servers.
Load balancer
has a feature to distribute load traffic to the backend servers. It is used to increase
performance ,scalability and availability to access the service in the large
traffic environment.
Normally
load balancer is used to load traffic to
the backend servers. Lets take an
example if in an organization existing web server is overloaded by hitting huge
no of traffic into the server, to fast the processing speed of the web server
we need to add extra one or many web server to access web portal from the outside world. Now
we place the load balancer top of the web servers to distribute traffic to all
the web servers equally.
Introduction of Load Balancer with example
Feature of Load Balancer
Load balancer
has one feature which is it checks periodically server health. If a server
failed the load balancer detect the problem and bypass the server and allocate
the entire load to the other live server to maintain the high availability. we
can manage logical server from the load balancer.
Other feature
is that persistency. It provides persistence feature to allow user to connect
their connection to the same server. this feature is very helpful when we are
taking about ecommerce site. When users purchasing
some online things via online shopping
cart they are using same server though this feature of load balancer.
Other feature
is that cookies persistence. when user login a website load balancer sent the
cookies to end user system .user can surfing website without relogin but it has
time frame.when it is expired user has to login again to access the website.
Algorithms of Load Balancer
Round robin : Normally it is used in the load
balancer to distribute traffic to all servers equally. First connection send to
the first server and next connection send to the next server and so on.
Shortest path:
it calculates the path matric which path is short to reach the server.
Server weight:server weight assigns to all servers
and traffic is distributed to the servers according against their assign value.
if server1 has a value which is 1 and server2 has a value which is 3 then load
balancer sends 3 times more traffic to server2.
Least connection: load balancer send the traffic to
the server which has lowest no of open connection.
simple and clear. Keep updating Devops Online Training
ReplyDelete