Load Balancers distribute incoming network traffic across multiple servers to ensure optimal resource utilization, minimize response time, and prevent server overload. When it comes to load balancing, three primary types exist: software load balancers, hardware load balancers, and virtual load balancers.
1. Types of Load Balancer - Based on Configurations
1.1. Software Load Balancers
Software load balancers are applications or components that run on general-purpose servers. They are implemented in software, making them flexible and adaptable to various environments.
- The application chooses the first one in the list and requests data from the server.
- If any failure occurs persistently (after a configurable number of retries) and the server becomes unavailable, it discards that server and chooses the other one from the list to continue the process.
- This is one of the cheapest ways to implement load balancing.
1.2. Hardware Load Balancers
As the name suggests we use a physical appliance to distribute the traffic across the cluster of network servers. These load balancers are also known as Layer 4-7 Routers and these are capable of handling all kinds of HTTP, HTTPS, TCP, and UDP traffic.
Hardware load balancers are dedicated devices designed for the sole purpose of managing network traffic. They often come as standalone appliances or modules within networking hardware.
- HLBs can handle a large volume of traffic but it comes with a hefty price tag and it also has limited flexibility.
- If any of the servers don’t produce the desired response, it immediately stops sending the traffic to the servers.
- These load balancers are expensive to acquire and configure, which is the reason a lot of service providers use them only as the first entry point for user requests.
- Later the internal software load balancers are used to redirect the data behind the infrastructure wall.
1.3. Virtual Load Balancers
A virtual load balancer is a type of load balancing solution implemented as a virtual machine (VM) or software instance within a virtualized environment ,such as data centers utilizing virtualization technologies like VMware, Hyper-V, or KVM. It plays a crucial role in distributing incoming network traffic across multiple servers or resources to ensure efficient utilization of resources, improve response times, and prevent server overload.
2. Types of Load Balancer - Based on Functions
2.1. Layer 4 (L4) Load Balancer/Network Load Balancer
Layer-4 load balancers operate at the transport layer of the OSI model. They make forwarding decisions based on information available in network layer protocols (such as IP addresses and port numbers).
Key Features of Layer-4(L4) Load Balancer:
- Transport Layer: Operates at the transport layer (TCP/UDP).
- Basic Load Balancing: Distributes traffic based on IP addresses and port numbers.
- Efficiency: Faster processing as it doesn’t inspect the content of the data packets.
- Network Address Translation (NAT): Can perform basic NAT to hide server addresses.
2.2. Layer 7 (L7) Load Balancer/Application Load Balancer
Layer-7 load balancers operate at the application layer of the OSI model. They can make load balancing decisions based on content, including information such as URLs, HTTP headers, or cookies.
Key Features of Layer-7(L7) Load Balancer
- Application Layer: Operates at the application layer (HTTP, HTTPS).
- Content-Based Routing: Distributes traffic based on content-specific information.
- Advanced Routing: Can make intelligent routing decisions based on application-specific data.
- SSL Termination: Capable of terminating SSL connections.
2.3. GSLB (Global Server Load Balancer) a.k.a. Multi-site Load Balancer
GSLB stands for Global Server Load Balancer. This type of load balancer goes beyond the traditional local load balancing and is designed for distributing traffic across multiple data centers or geographically distributed servers.
- A GSLB load balancer is concerned with global or wide-area load balancing.
- It takes into account factors such as server proximity, server health, and geographic location to intelligently distribute traffic across multiple locations.
Similar Reads
What is Load Balancer & How Load Balancing works? A load balancer is a crucial component in system design that distributes incoming network traffic across multiple servers. Its main purpose is to ensure that no single server is overburdened with too many requests, which helps improve the performance, reliability, and availability of applications.Ta
9 min read
Load Balancer - System Design Interview Question When a website becomes extremely popular, the traffic on that website increases, and the load on a single server also increases. The concurrent traffic overloads the single server and the website becomes slower for the users. To meet the request of these high volumes of data and to return the correc
7 min read
Types of Load Balancer Load Balancers distribute incoming network traffic across multiple servers to ensure optimal resource utilization, minimize response time, and prevent server overload. When it comes to load balancing, three primary types exist: software load balancers, hardware load balancers, and virtual load balan
4 min read
Load Balancing Algorithms 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 e
15+ min read
How does a Load Balancer Works? A load balancer is a crucial component in system design, ensuring that incoming network traffic is efficiently distributed across multiple servers or resources. The primary goal is to optimize resource utilization, enhance system performance, and ensure high availability and fault tolerance. The fun
3 min read
Load Balancing Approach in Distributed System A load balancer is a device that acts as a reverse proxy and distributes network or application traffic across a number of servers. Load adjusting is the approach to conveying load units (i.e., occupations/assignments) across the organization which is associated with the distributed system. Load adj
3 min read
How to Create a Load Balancer? Creating a load balancer typically involves using dedicated hardware or software solutions. Below are general steps for setting up a basic load balancer in a traditional, non-cloud environment: To create a Classic Load Balancer:Table of Content Step 1: Choose a Load Balancer SolutionStep 2: Design Y
3 min read
Reverse Proxy Vs. Load Balancer In the realm of system design, confusion often arises regarding the distinct roles of reverse proxies and load balancers. Despite their critical importance in managing and optimizing web traffic, these components serve unique purposes and possess different functionalities. In this article, we will d
4 min read
Layer 4 Load Balancing vs. Layer 7 Load Balancing Load balancing is the process of distributing incoming network traffic or computational workloads across multiple servers, resources, or processes in a network. The primary goal of load balancing is to optimize resource utilization, maximize throughput, minimize response time, and avoid overload on
5 min read
Load Balancing using AWS Load balancing is a critical component in ensuring the seamless functioning and high availability of web applications. As cloud computing continues to dominate the modern tech landscape, Amazon Web Services (AWS) has emerged as a leading cloud platform, offering an array of robust load-balancing ser
6 min read