CSC481 ยท 2079 ยท 5 marks
What is load balancing? How is load balancing done?
What is load balancing? How is load balancing done? [5]
Quick answer
Load balancing refers to the process of distributing a set of tasks over a set of resources with the aim of making their overall processing more efficient. It optimizes response time and avoids unevenly overloading some compute nodes while other nodes are left idle. In the context of networking and cloud computing, it refers to distributing incoming network traffic across a group of backend servers.
Load Balancing
Definition
How Load Balancing is Done
Load balancing is typically performed using a load balancer, which sits between the client and the backend server pool. The following are the common methods/algorithms used to perform load balancing:
1. Round Robin
- Requests are distributed to each server in a sequential, cyclic order.
- Simple and easy to implement.
- Works well when all servers have equal capacity.
2. Least Connection Method
- The load balancer directs traffic to the server with the fewest active connections at that moment.
- Suitable when requests have varying processing times.
3. IP Hash Method
- The client's IP address is used to determine which server receives the request.
- Ensures that a particular client is always directed to the same server (session persistence).
4. Weighted Round Robin
- Each server is assigned a weight based on its capacity.
- Servers with higher weights receive more requests than those with lower weights.
- Useful when servers have different processing capabilities.
5. Resource-Based (Adaptive) Load Balancing
csc481-load-balancing-methods
- The load balancer checks the current load/health of each server (CPU usage, memory, etc.) before forwarding a request.
- Requests are sent to the server with the most available resources.
Benefits of Load Balancing
| Benefit | Description |
|---|---|
| Improved Performance | Distributes workload evenly, reducing response time |
| High Availability | If one server fails, traffic is redirected to others |
| Scalability | New servers can be added easily to handle more load |
| No Single Point of Failure | Ensures continuous service availability |
Summary
Load balancing is a critical technique in cloud computing and distributed systems that ensures efficient resource utilization, high availability, and optimal response time by intelligently distributing tasks or network traffic across multiple servers or nodes.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.