beehive
Soheil Hassas Yeganeh
Towards a simple abstraction for scalable software-defjned networking
Yashar ganjali
University of Toronto
beehive software-de fj ned networking Soheil Hassas Yeganeh Yashar - - PowerPoint PPT Presentation
Towards a simple abstraction for scalable beehive software-de fj ned networking Soheil Hassas Yeganeh Yashar ganjali University of Toronto Traditional networks Hard to Program Distributed Systems Controller Controller Controller Switch
Soheil Hassas Yeganeh
Towards a simple abstraction for scalable software-defjned networking
Yashar ganjali
University of Toronto
2
Switch Controller Switch Controller Switch Controller
Hard to Program Distributed Systems
3
Switch Switch Controller Switch Application
Hard to Program Distributed Systems Easy Centralized
Hard to Program Distributed Systems
4
Controller Application Controller Application Switch Switch Switch
Easy Existing Distributed Controllers
scalability
scenarios
Hard to Program Distributed Systems
5
Controller Application Controller Application Switch Switch Switch
M u c h b e t t e r t h a n t r a d i t i
a l n e t w
k s
still Existing Distributed Controllers
distributed programming
instrument and optimize apps
Hard to Program Distributed Systems
6
Controller Application Controller Application Switch Switch Switch
Easy similar to centralized controllers +
placements + application analytics
7
Application
centralized
8
Application
centralized
Application Application Application
can be automatically transformed into
9
Application
centralized
Application Application Application
can be automatically transformed into distributed
10
Application Application Application
distributed
Machine Machine Machine
deployed on multiple physical machines.
Application
centralized
Machine
= Very challenging for generic control applications.
11
Application Application Application Application Control Platform Machine Machine Machine Compiler Abstraction
Application
12
what is a control application?
Dictionaries
msg
in async messages application functions Process using state dictionaries
Function msg Function Function
13
how do applications communicate?
async messages state dictionaries
Application Function Function
functions of the same application all functions
Application Function Function Function Function msg msg msg
14
Traffjc Engineering Init Query Collect Route S T
Statistics Topology
SwitchJoined{si}
s
i
Timeout StatQuery{si} StatResult{si} Timeout FlowMod
si si : s t a t s * * Initializes dictionary Queries switches Collects stat results Reroutes fmows, if needed
15
Traffjc Engineering Init Query Collect Route si si si
How to transform TE into a distributed application while preserving state consistency?
* * S T
16
Traffjc Engineering Init Query Collect Route si si si
Functions create an implicit mapping between messages and dictionary entries: The entries a function needs to process a message.
* * S T
SwitchJoined{si} Timeout StatResult{si} Timeout
The dictionary key is in the message For each entry All entries
17
Traffjc Engineering Init Query Collect Route si si si
Init(), Query() and Collect() access S on a per switch basis.
S T
SwitchJoined{si} Timeout StatResult{si}
18
Traffjc Engineering Init Query Collect Route
Init(), Query() and Collect() access S on a per switch basis.
si si si
Switch Entry
1
fmow1 -> stat fmow2 -> stat
2
fmow3 -> stat fmow4 -> stat
S T
19
Traffjc Engineering Init Query Collect Route s1 s1 s1 Traffjc Engineering Init Query Collect Route s2 s2 s2 Machine 1 Machine 2
Switch Entry
1
fmow1 -> stat fmow2 -> stat
Switch Entry
2
fmow3 -> stat fmow4 -> stat
S T S T
20
Traffjc Engineering Init Query Collect Route
Init(), Query() and Collect() access S on a per switch basis.
si si si
Switch Entry
1
fmow1 -> stat fmow2 -> stat
2
fmow3 -> stat fmow4 -> stat
*
Route() accesses the whole dictionary S to process the timeout message.
S T
Timeout
21
Traffjc Engineering Init Query Collect Route s1 s1 s1 Traffjc Engineering Init Query Collect Route s2 s2 s2 Machine 1 Machine 2
Switch Entry
1
fmow1 -> stat fmow2 -> stat
Switch Entry
2
fmow3 -> stat fmow4 -> stat
* *
This will cause in consistency.
S T S T
22
Traffjc Engineering Init Query Collect Route si si si Traffjc Engineering Init Query Collect Route Machine 1 Machine 2 *
Switch Entry
1
fmow1 -> stat fmow2 -> stat
2
fmow3 -> stat fmow4 -> stat
S T S T
23
Application Function 1 Function 2
k1 k2 k3 k4 k5
msg 1 msg 2
k4 k2 k2 k3 k5 k1
msg 3
24
Application Function 1 Function 2
k2 k3 k4 k5
msg 1 msg 2 Machine Machine Application Function 1 Function 2
k1
msg 3
We need a runtime that steers messages among application instances while preserving consistency.
Application Function 1 Function 2 Application Function 1 Function 2 Application Function 1 Function 2
26
Application
F F
Hive Hive
Application
F F
Hive Cell Bee + +
27
Application
F F
Hive Hive
Application
F F
Hive
28
Application
F F
Hive Hive
Application
F F
Cell • an entry in a dictionary of a specifjc application
29
Application
F F
Hive Hive
Application
F F
Bee
Switch Switch
30
TE
C I
Hive Hive
TE
C I
Switch Switch m
31
TE
C I
Hive Hive
TE
C I
Switch Switch m Switch Switch
32
TE
C I
Hive Hive
TE
C I
Switch Switch m
How do we infer the cells?
Switch Switch
33
Hive
TE
C I
m
How do we infer the cells?
func Collect(r, s): s.append(flow stats in r)
Collect(r, S[r.switch]) map StatReply(r): return (S, r.switch) map(app, msg) is an application defjned function
that maps a message to the set of cells used to process that message. Beehive’s compiler can automatically generate the map function. 1-3 lines of code
Switch Switch
34
Hive
TE
C I
m Switch Switch
35
TE
C I
Hive Hive
TE
C I
Switch Switch Switch Switch
36
TE
C I
Hive Hive
TE
C I
Switch Switch Switch Switch m
37
TE
C I
Hive Hive
TE
C I
Switch Switch Switch Switch m
38
TE
C I
Hive Hive
TE
C I
m Switch Switch Switch Switch
39
TE
C I
Hive Hive
TE
C I
m Switch Switch Switch Switch
This is not optimal and can happen often.
40
TE
C I
Hive Hive
TE
C I
m Switch Switch Switch Switch m m
41
TE
C I
Hive Hive
TE
C I
m Switch Switch Switch Switch m m
42
TE
C I
Hive Hive
TE
C I
m Switch Switch Switch Switch m m m m
43
TE
C I
Hive Hive
TE
C I
m Switch Switch Switch Switch m m m m
When/where should we migrate bees?
44
TE
C I
Hive Hive
TE
C I
Switch Switch Switch Switch
Our heuristic A bee that receives the majority of its messages from bees on another hive is migrated to that hive.
45
TE
C I
Hive Hive
TE
C I
Switch Switch Switch Switch
46
TE
C I
Hive Hive
TE
Switch Switch Switch Switch
R Q C I R Q
47
TE
C I
Hive Hive
TE
Switch Switch Switch Switch
R Q C I R Q
48
TE
C I
Hive Hive
TE
Switch Switch Switch Switch
R Q C I R Q
centralized Hives Hives
49
TE
C I
Hive Hive
TE
Switch Switch Switch Switch
R Q C I R Q
centralized Hives Hives
m m
50
Hive Hive Switch Switch Switch Switch
well-balanced Hives Hives
TE
C I
TE
R Q C I R Q
m m
51
Hive Hive Hive
Colony of replicated bees all in consensus about their state.
TE
C I R Q
TE
C I R Q
TE
C I R Q
52
Centralized Kandoo NIB
func Centralized(msg): … map Centralized(msg): return {(D, 0)} func Local(msg): … map Local(msg): return {(D, hiveid)} func NIB(msg): … map NIB(msg): return {(N, nodeid)}
Virtual Networking
func VN(msg): … map VN(msg): return {(VN, vnid)}
Routing
func Router(msg): … map Router(msg): return {(Adv, msg.n[0])}
+ you don’t need to think about placement and load balancing in most cases.
53
54
Hives (1−40) Hives (1−40) Hives (1−40) Hives (1−40)
Centralized Decoupled
400 1000
BW (KB/s)
400 1000
BW (KB/s)
These spikes are for instrumentation data (periodic at 10s)
Hives (1−40) Hives (1−40)
55
Decoupled
400 1000
BW (KB/s)
400 1000
BW (KB/s) Hives (1−40) Hives (1−40)
then dynamically optimized All artifjcially centralized
This spike is for replicating cells on 40 hives. (~4sec.)
56
Distributed programming in SDN doesn’t have to be complicated.