0% found this document useful (0 votes)
3 views

Parallel and Distributed lec 10

The document provides an overview of load balancing in parallel and distributed computing, detailing its purpose, working mechanisms, and various algorithms used for traffic distribution among servers. It categorizes load balancing into types such as application, network, global server, and DNS load balancing, highlighting their specific functions and benefits. Additionally, it addresses the challenges faced in load balancing, including heterogeneous workloads and communication overhead.

Uploaded by

reactuser76
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Parallel and Distributed lec 10

The document provides an overview of load balancing in parallel and distributed computing, detailing its purpose, working mechanisms, and various algorithms used for traffic distribution among servers. It categorizes load balancing into types such as application, network, global server, and DNS load balancing, highlighting their specific functions and benefits. Additionally, it addresses the challenges faced in load balancing, including heterogeneous workloads and communication overhead.

Uploaded by

reactuser76
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Parallel and Distributed

Computing
COMP3139
Contents
• Load Balancing
• Load Balancing Working
• Load Balancing Algorithms
• Types of Load Balancing
• Benefits of Load Balancing
• Challenges of Load Balancing
WHAT IS LOAD BALANCING?

• Method of distributing network traffic equally across a pool of


resources that support an application.
• Millions of users simultaneously and return the correct text, videos,
images, and other data to each user in a fast and reliable manner.
• most applications have many resource servers with duplicate data
between them.
• 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.

3
WORKING OF LOAD BALANCING

• Companies usually have their application running on multiple


servers.
• Such a server arrangement is called a server farm.
• User requests to the application first go to the load balancer.
• The load balancer then routes each request to a single
server in the server farm best suited to handle the request.

4
WORKING OF LOAD BALANCING

• Load balancing is like the work done by a manager in a


restaurant.
• Consider a restaurant with five waiters. If customers were
allowed to choose their waiters, one or two waiters could
be overloaded with work while the others are idle. To avoid
this scenario, the restaurant manager assigns customers
to the specific waiters who are best suited to serve them.

5
LOAD BALANCING ALGORITHMS

• Load balancing algorithms fall into two main categories:

Static load balancing


Static load balancing algorithms follow fixed rules and are
independent of the current server state. The following are examples
of static load balancing.

1. Round-robin method
Servers have IP addresses that tell the client where to send requests.
The IP address is a long number that is difficult to remember.
6
ROUND-ROBIN METHOD

• To make it easy, a Domain Name System maps website


names to servers.
• When you enter aws.amazon.com into your browser, the
request first goes to our name server, which returns our IP
address to your browser.
• An authoritative name server does the load balancing
instead of specialized hardware or software.

7
LOAD BALANCING ALGORITHMS

• Round-robin
method
• The name server returns
the IP addresses of different
servers in the server farm
turn by turn or in a round-
robin fashion.

8
LOAD BALANCING ALGORITHMS

2. Weighted round-robin method


In weighted round-robin load balancing, you can assign different weights to each
server based on their priority or capacity.
Servers with higher weights will receive more incoming application traffic from the
name server.

3. IP hash method
In the IP hash method, the load balancer performs a mathematical computation, called
hashing, on the client IP address. It converts the client IP address to a number, which is
then mapped to individual servers.
9
LOAD BALANCING ALGORITHMS

• Dynamic load balancing

Dynamic load balancing


algorithms examine the
current state of the servers
before distributing traffic.
The following are some
examples of dynamic load
balancing algorithms.

10
LOAD BALANCING ALGORITHMS

1. Least connection method


A connection is an open communication channel between a client and a server.
When the client sends the first request to the server, they authenticate and
establish an active connection between each other. In the least connection method,
the load balancer checks which servers have the fewest active connections and
sends traffic to those servers.
This method assumes that all connections require equal processing power for all
servers.

11
LOAD BALANCING ALGORITHMS

2. Weighted least connection method


• Weighted least connection algorithms assume that some servers can handle
more active connections than others.
• you can assign different weights or capacities to each server,

3. Least response time method


• The response time is the total time that the server takes to process the
incoming requests and send a response.
• Load balancers use this algorithm to ensure faster service for all users.
12
LOAD BALANCING ALGORITHMS

4. Resource-based method
• In the resource-based method, load balancers distribute
traffic by analyzing the current server load.
• Specialized software called an agent runs on each server and
calculates usage of server resources, such as its computing
capacity and memory.
• Then, the load balancer checks the agent for sufficient free
resources before distributing traffic to that server.

13
TYPES OF LOAD BALANCING

1. Application load balancing


• Complex modern applications have several server farms with multiple
servers dedicated to a single application function.
• Application load balancers look at the request content, such as HTTP
headers or SSL session IDs, to redirect traffic.
For example, an ecommerce application has a product directory,
shopping cart, and checkout functions. By comparison, it sends shopping
cart requests to servers that can maintain many client connections and
save cart data for a long time.

14
TYPES OF LOAD BALANCING

2. Network load balancing


• Network load balancers examine IP addresses and other network
information to redirect traffic optimally.
• They track the source of the application traffic and can assign a static IP
address to several servers.
• Network load balancers use the static and dynamic load balancing
algorithms described earlier to balance server load.

15
TYPES OF LOAD BALANCING

2. Global server load balancing


• Global server load balancing occurs across several
geographically distributed servers.
For example, companies can have servers in multiple data centers,
in different countries, and in third-party cloud providers around the
globe. In this case, local load balancers manage the application
load within a region or zone. They attempt to redirect traffic to a
server destination that is geographically closer to the client. They
might redirect traffic to servers outside the client’s geographic
zone only in case of server failure. 16
TYPES OF LOAD BALANCING

3. DNS load balancing


• In DNS load balancing, you configure your domain to route network
requests across a pool of resources on your domain.
• A domain can correspond to a website, a mail system, a print
server, or another service that is made accessible through the
internet.
• DNS load balancing is helpful for maintaining application availability
and balancing network traffic across a globally distributed pool of
resources.
17
BENEFITS OF LOAD BALANCING

1. Application availability
• Run application server maintenance or upgrades without
application downtime
• Provide automatic disaster recovery to backup sites
• Perform health checks and prevent issues that can cause
downtime

18
BENEFITS OF LOAD BALANCING

2. Application performance
• Distribute the load evenly between servers to improve
application performance
• Redirect client requests to a geographically closer server
to reduce latency
• Ensure the reliability and performance of physical and
virtual computing resources
19
BENEFITS OF LOAD BALANCING

3. Application security
• Monitor traffic and block malicious content
• Automatically redirect attack traffic to multiple backend
servers to minimize impact
• Route traffic through a group of network firewalls for
additional security

20
CHALLENGES IN LOAD BALANCING

• Heterogeneous Workloads: Some tasks may require


significantly more time than others, making it hard to
evenly distribute load.
• Communication Overhead: Dynamic load balancing often
requires processors to communicate frequently, increasing
overhead.

• Latency and Network Delays: In distributed systems,


varying network speeds can result in uneven task completion times.
21
THANK YOU

You might also like