8 - Load Balancing Flashcards

1
Q

Where might load balancing apply?

A

Master-worker parallel computation
Traffic management
Collision avoidance

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

Challenges of load balancing

A

Procedure complexity
Outdated info
Fault Tolerance
Scalability
Heterogeneous hardware - different speeds/capacity

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

Static load balancing

A

Doesn’t consider state
All set in advance

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

Static: Attributes

A

Do not change
Tasks needed to be regular

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

Round robin algorithm

A

Assign next ball to next bin then start again

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

Weighted round robin

A

A larger bin is given more balls/jobs

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

Round Robin General problem

A

State not being considered means that jobs with different durations/temporarily slow servers affect it.

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

Simple Randomised

A

For each ball, choose a random bin. No state info

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

Simple randomised: Examples

A

Client side load balancing - randomly choose ip
Hash tables - hash value can be used

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

Hash function with n buckets

A

Simple using modulo eg h(ID) = ID mod n

30 for 6 buckets = 0
11 = 5

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

Random vs Hash

A

Random cannot find same item again
Hashing; item can be found knowing ID and hash function

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

Dynamic Load Balancer

A

Based on current state.
Can move tasks where necessary
Allows greater modularity

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

Least loaded Bin

A

Server side balancer forwards request to backends.

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

Least time allocation

A

Allocation to bin that will serve at earliest time. Considers speed and queues

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

Multiple Dispatcher Problem

A

They will send their request to the same server (herd behaviour) and has opposite effect on performance.

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

Goren et al Multi dispatch solution

A

Round based algorithm. Allocate to bins based on probabilities in current round.

Need to know server queues, processing rates and job arrival rates

17
Q

Dynamic Randomised

A

Choose multiple random bins, allocate the ball to the bin of lowest load

18
Q

Power of two choices improvements

In terms of m balls and n bins

A

Case m = n: Exp improvement
Case m > n: Max load above avg is independent of num balls m

19
Q

When does multiple-choice lose some power?

A

In parallel settings

20
Q

Parallel Scenario

A

Balls arrive in batches of n
Allocated using GREEDY[d] but bin loads only updated between batches.
Decisions may be based on outdated load info

21
Q

g-bounded process

A

Allocated using two choices, but if load difference is g or less then process makes mistake.

22
Q

Gap between average load in parallel, 1 + β process and g-bounded scenario

A

Independent of m (number of balls)

23
Q

1 + β process

(balls into bins)

A

Some balls allocated using 2 choices, the rest using 1.

2 bins queries, and with probability 1 - β, ball is allocated to random bin. 1+ β choice for each ball

24
Q

Probability that none of m = n balls fall into particular bin

A

1/e

25
Q

Expected number of empty bins

A

n/e

This is greatly simplified process

26
Q

Collision

A

Any two or more balls falling into one bin

27
Q

Bernoulli Process (probability that ball falls into bin and doesn’t)

A

Ball falls into bin: 1/n
Ball does not fall into bin: 1 - 1/n

28
Q

Probability of at least k balls

A

(e/k)^k

29
Q

Maximum load in any bin

A

At most (3ln(n))/ln(ln(n))

High probability is 1 - o(n)

30
Q

Distributed hash table

A

Set of nodes that store items

31
Q

Chord

A

Nodes organsied in logical ring with N nodes

32
Q

Scalable key location run time

A

O(log(N))

Every shortcut cuts distance at least in half.

33
Q

Chord: Adding a Node x

A

Let y successor of x.
Move items at y that belong to x to x
Update finger tables

34
Q

Chord: Removing a node

A

(Move items to successor)
Let y be successor of x
Move items of x to y
Update finger tables

35
Q

Chord: Advantages

A

Scalable
Small routing tables
Fully decentralised

36
Q

Is a chord well load-balanced?

A

No - different arc lengths.

Eg node 28 is assigned everything from 22 to 28. 21 only items hashed to 21

37
Q

Load balancing a Chord

A

Map every node to r cycle points
r arcs per node = distribution is more even