What is Load – Balancing?
It is a
process/technique of distributing the requests evenly across a computer network
so that no single device is overloaded. It becomes an essential entity for
networks where it's difficult to predict the number of requests that will be
issued to a server. If one server starts to get swamped, requests are forwarded
to another server so that the requests are not failed.
Why do we need load balancing?
Load balancing is an
important attribute in a high complicated applications or when the user
requests are high. It became mandate in the current trend applications because
of the following benefits:
·
Better performance - By sharing
the web traffic
·
High Scalability - By distributing
the client requests across multiple servers
·
High availability – Re-routes
the traffic to another server if any of the server is down
Where Load-Balancing can be applied?
Load Balancing can be
applied in any layer. It can be applied in
·
Web Servers
·
Application Servers
·
Database Servers
How does Load Balancing work?
Load Balancing intercepts
each incoming HTTP request and redirects them to a cluster of servers. This
logic is achieved on various means based on the type of sprayer used.
Equipment Used:
Load balancing can be
done by
·
Load dispatcher
·
Network dispatcher
·
Load balancer
Load Balancing Algorithms:
1. Random Allocation
In this algorithm, HTTP
requests are assigned to a server picked randomly from a group of servers. One of the servers may be assigned many
requests to process, while the other servers can be idle.
Pros:
Simple to implement
Cons:
May lead to overloading
of one server while others are under-utilized
2. Round Robin Allocation
IP sprayer assigns the
requests to a list of the servers based on a circular queue
Only the first request
is allocated to a server randomly whereas the IP sprayer follows the circular
order for subsequent requests
pros:
Requests are equally
divided among the available servers
cons:
Not suitable if the
server specifications are not identical to each other in the server group
3. Weighted Round-Robin
Allocation
A weight is assigned to
each server in the group. If one server is capable of handling twice as much
load as the other, the powerful server
gets a weight of 2. Two requests are assigned to a powerful server wherein the
weaker one gets one request.
Pros:
Capacity of the servers
in the group are taken care of
Cons:
For each individual
request, the advanced load balancing requirements such as processing times are
not considered
Method of load balancing
4. Round Robin DNS Load
Balancing
In-built round-robin
feature of a DNS server is used. It’s an early adopted load balancing technique
to cycle through the IP addresses corresponding to a group of servers in a
cluster
pros:
simple
inexpensive
easy to implement
cons:
No knowledge about
server availability
2. Hardware Load balancing
Here TCP/IP packets are
routed to various servers in a cluster by providing a robust topology with high
availability
Pros:
Uses circuit level
network gateway to route traffic
Cons:
Higher costs compared to
software versions
3. Software Load Balancing
It comes as an
integrated component of expensive web server and application server software
packages
pros:
Cheaper than hardware load
balancers
More configurable based
on requirements
Incorporate intelligent
routing based on multiple input parameters
Cons:
Need to provide
additional hardware to isolate the load balancer.

No comments:
Post a Comment