Load Balancing1
Load Balancing1
Question
Answer:
Load balancing is a technique for distributing incoming network
traffic across multiple backend servers or clusters to optimize
resource utilization, maximize throughput, minimize response time,
and avoid overloading any single resource. Using load balancing
helps ensure high availability and reliability of applications by
providing the flexibility to add or subtract backend servers as
needed.
• 2.
What is Round-Robin Load Balancing?
Question
Answer:
Round-robin load balancing is one of the simplest algorithms for
distributing incoming requests evenly across multiple backend
servers.
Benefits:
o Simple to implement
Drawbacks:
o Stateless - does not consider individual server load
Answer:
A hardware-based load balancer is a hardware appliance that can securely process and redirect
gigabytes of traffic to hundreds of different servers. You can store it in your data centers and use
virtualization to create multiple digital or virtual load balancers that you can centrally manage.
Software-based load balancers are applications that perform all load balancing functions. You
can install them on any server or access them as a fully managed third-party service.
Hardware load balancers require an initial investment, configuration, and ongoing maintenance.
You might also not use them to full capacity, especially if you purchase one only to handle peak-
time traffic spikes. If traffic volume increases suddenly beyond its current capacity, this will affect
users until you can purchase and set up another load balancer.
In contrast, software-based load balancers are much more flexible. They can scale up or down
easily and are more compatible with modern cloud computing environments. They also cost less
to set up, manage, and use over time.
What are the types of load balancing?
We can classify load balancing into three main categories depending on what the load balancer
checks in the client request to redirect the traffic.
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. The application load balancer sends requests for browsing products to servers that
contain images and videos but do not need to maintain open connections. By comparison, it
sends shopping cart requests to servers that can maintain many client connections and save cart
data for a long time.
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.
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.
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.
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.
What are the benefits of load balancing?
Load balancing directs and controls internet traffic between the application servers and their
visitors or clients. As a result, it improves an application’s availability, scalability, security, and
performance.
Application availability
Server failure or maintenance can increase application downtime, making your application
unavailable to visitors. Load balancers increase the fault tolerance of your systems by
automatically detecting server problems and redirecting client traffic to available servers. You can
use load balancing to make these tasks easier:
You can use load balancers to direct network traffic intelligently among multiple servers. Your
applications can handle thousands of client requests because load balancing does the following:
Load balancers come with built-in security features to add another layer of security to your
internet applications. They are a useful tool to deal with distributed denial of service attacks, in
which attackers flood an application server with millions of concurrent requests that cause server
failure. Load balancers can also do the following:
Load balancers improve application performance by increasing response time and reducing
network latency. They perform several critical tasks such as the following:
• Ensure the reliability and performance of physical and virtual computing resources
What are load balancing algorithms
Unpredictable No Yes
load handling
Advantages:
Disadvantages: