0% found this document useful (0 votes)
3 views12 pages

Unit 4.2 Load Balancing Algorithm

Load balancing algorithms are crucial for managing traffic across servers in a network, ensuring no single server becomes overloaded. They can be categorized into static and dynamic types, with various techniques such as Round Robin, Weighted Round Robin, and Least Connections employed to distribute workloads effectively. Static algorithms assign tasks based on fixed allocations, while dynamic algorithms adapt to real-time server conditions to optimize performance.

Uploaded by

Niraj There
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views12 pages

Unit 4.2 Load Balancing Algorithm

Load balancing algorithms are crucial for managing traffic across servers in a network, ensuring no single server becomes overloaded. They can be categorized into static and dynamic types, with various techniques such as Round Robin, Weighted Round Robin, and Least Connections employed to distribute workloads effectively. Static algorithms assign tasks based on fixed allocations, while dynamic algorithms adapt to real-time server conditions to optimize performance.

Uploaded by

Niraj There
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Load Balancing Over Networks –

Algorithms and Applications


Why Load Balancing Algorithm?
-To control traffic across servers in a network, load-balancing
algorithms are important.
-By spreading requests evenly, load balancers make sure that no
single server is overloaded when several people visit an application.
-Various techniques, such as IP hash, Least Connections, and Round
Robin, are employed, depending on the traffic patterns and
application type.
What are Load Balancing Algorithms?

Algorithms for load balancing are strategies for effectively allocating workloads among several
servers or resources.
Consider that you have a group of employees and numerous jobs to finish. To keep everyone
active and complete the work efficiently, you should split the tasks evenly rather than assigning
one person to perform all the work while others sit around doing nothing.
In computing, load balancing accomplishes exactly that.
Load balancing algorithms can be broadly categorized into two types:
1. Dynamic load balancing
2. Static load balancing.
3. Resource-based Load
Balancing Algorithm
Static Load Balancing Algorithms
Static load balancing involves predetermined assignment of tasks or resources without
considering real-time variations in the system. This approach relies on a fixed allocation of
workloads to servers or resources, and it doesn’t adapt to changes during runtime.
Types of Static Load Balancing Algorithms are:

1. Round Robin Load Balancing Algorithm


The Round Robin algorithm is a simple static load balancing approach in which requests are
distributed across the servers in a sequential or rotational manner. It is easy to implement but it
doesn’t consider the load already on a server so there is a risk that one of the servers receives a
lot of requests and becomes overloaded.
2. Weighted Round Robin Load Balancing Algorithm

The Weighted Round Robin algorithm is also a static load balancing approach which is much
similar to the round-robin technique. The only difference is, that each of the resources in a list is
provided a weighted score. Depending on the weighted score the request is distributed to these
servers.

● Servers with higher weights are given a larger proportion of the requests.
● The distribution is cyclic, similar to the round-robin technique, but with each server
receiving a number of requests proportional to its weight.
● If a server reaches its processing capacity, it may start rejecting or queuing additional
requests, depending on the server's specific behavior.
For example

Let's say you have three servers with weights: Server1 (weight 0.3), Server2 (weight 0.2),
and Server3 (weight 0.1). The total weight is 0.3 + 0.2 + 0.1 = 0.6. During each cycle,
Server1 would receive 0.3/0.6 (50%) of the requests, Server2 would receive 0.2/0.6
(33.33%), and Server3 would receive 0.1/0.6 (16.67%).
3. Source IP Hash Load Balancing Algorithm

This algorithm aims to ensure that requests originating from the same source IP address are
consistently directed to the same server.

The goal is to ensure that requests coming from

the same source IP address are consistently routed

to the same server.


Dynamic Load Balancing Algorithms
1. Least Connection Method Load Balancing Algorithm
The Least Connections algorithm assigns new requests to the server with the fewest active
connections.

The idea is to distribute incoming workloads in a way that minimizes the current load on
each server, aiming for a balanced distribution of connections across all available resources.

-To do this load balancer needs to do


some additional computing to identify
the server with the least number of connections.

-This may be a little bit costlier compared to the


round-robin method but the evaluation is based
on the current load on the server.
2. Least Response Time Method Load Balancing Algorithm

The Least Response method aims to minimize response times by directing new requests to the
server with the quickest response time.

-It considers the historical performance of


servers to make decisions about where to
route incoming requests, optimizing for faster
processing.

-The dynamic aspect comes from the


continuous monitoring of server response
times and the adaptive nature of the algorithm
to route incoming requests to the server with
3. Resource-based Load Balancing Algorithm

The Resource-Based Load Balancing algorithm distributes incoming requests based on the
current resource availability of each server, such as CPU usage, memory, or network bandwidth.
Rather than just routing traffic equally or based on past performance, this algorithm evaluates
the current "resource health" of each server to decide where new requests should go.

You might also like