Load Balancing Algorithms Flashcards

What are they and when you would use them (7 cards)

1
Q

What is round robin load balancing and what considerations should drive its use?

A

Round robin load balancing distributes traffic cyclically and equally amongst servers.

Pros: Easy to implement and understand, works well when servers have similar capacities.

Cons: No system awareness or session affinity Because it’s predictable, it’s exploitable.

Use Case: homogenous envs or stateless apps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is weighted road robin load balancing and what considerations should drive its use?

A

Round robin but with weights assigned to servers based on capacity/performance.

Pros: Optimizes performance by distributing load by capacity and is flexible.

Cons: Overhead and complexity is measuring and assigning weights. Not great for variable traffic loads.

Use cases: Heterogenous environments with differently scaled servers: like dbs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Least connections load balancing and what considerations should drive its use?

A

It assigns incoming requests to the server with the fewest active connections at the time of the request.

Pros: Accounts for load and adapts to changing traffic patterns.

Cons: Hard to monitor active connections and can lead to connection spikes until state is updated.

Use cases: Heterogenous environments, variable traffic patterns, stateful applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is weighted least connections load balancing and what considerations should drive its use?

A

Least connections + weighted round robin.

Pros: Dynamic and capacity aware

Cons: Complex - a lot of overhead in maintaing state of active connections and server weights.

Use cases: High web traffic apps to esnure no bottlenecks like with database clusters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is IP hash load balancing and what considerations should drive its use?

A

Assigns client requests to servers based on the client’s IP address.

Pros: Session persistence, simple, and deterministic.

Cons: Uneven distribution, dynamic changes, and limited flexibility.

**Use Cases: ** Stateful apps with session persistence, geographically distributed clients who need consistent routing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Least response time load balancing and what considerations should drive its use?

A

Dynamically assigns incoming requests to the server with the lowest response time.

Pros: Effective resource utilization and performance optimized.

Cons: Complex, overhead havy, fluctuations lead to rebalancing.

Use cases:
Real time services (video streaming, gaming) with varying server performance and fluctuating loads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is least bandwidth load balancing and what considerations should drive its use?

A

Distributes incoming requests to servers based on the current bandwidth usage

Pros: Prevents overloading and utlizes resources efficiently.

Cons: Complex, overheady, and frequent rebalancing may be necessary.

Use Cases: High bandwidth apps, CDNs, real time apps with low latency requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly