Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection •...

45
ETH Zurich – Distributed Computing Group Roger Wattenhofer Managing Dynamic Networks: Distributed or Centralized Control?

Transcript of Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection •...

Page 1: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

ETH Zurich – Distributed Computing Group

Roger Wattenhofer

Managing Dynamic Networks:Distributed or Centralized Control?

Page 2: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Paul Baran

Page 3: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

“On Distributed Communications” (1964)

Page 4: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

“On Distributed Communications” (1964)

Page 5: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

“On Distributed Communications” (1964)

1. Node & Edge Destruction

2. Distributed Routing

Page 6: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has
Page 7: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

people stopped worryingabout the bomb!

Page 8: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Today: Inter-Data Center WANs

Think: Google, Amazon, Microsoft

Page 9: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Uti

lizat

ion

Time [1 Day]

peak before rate adaptation

> 50% peak reduction

mean

Problem: Typical Network Utilization

Page 10: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Backgroundtraffic

Non-background traffic

Uti

lizat

ion

Time [1 Day]

mean

Problem: Typical Network Utilization

Page 11: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Background traffic

Non-background traffic

Uti

lizat

ion

Time [1 Day]

peak before rate adaptation

peak after rate adaptation

> 50% peak reduction

Problem: Typical Network Utilization

Page 12: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

1 2 3

567

1 2 3

567

BetterMPLS-TE

Another Problem: Online Routing Decisions

flow arrival order: A, B, C

each link can carry at most one flow (in both directions)

4

4

Page 13: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Software Defined Networks (SDNs)

Page 14: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

WANswitches

rateallocation

networkconfiguration

[rate limiting] [forwarding plane update]

SWAN controller

traffic demand

topology,traffic

[global optimization for high utilization]

Hosts

Dealing with Network Dynamics: The SWAN Project

[Hong et al., SIGCOMM 2013]

Page 15: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Solution: Multicommodity Flow LP

max 𝑖𝑓𝑖

0 ≤ 𝑓𝑖 ≤ 𝑑𝑖

𝑖 𝑓𝑖(𝑒) ≤ 𝑐 𝑒

𝑢𝑓𝑖 𝑢, 𝑣 =

𝑤𝑓𝑖 𝑣,𝑤

𝑣𝑓𝑖(𝑠𝑖 , 𝑣) =

𝑢𝑓𝑖(𝑢, 𝑡𝑖) = 𝑓𝑖

Maximize throughput of flows 𝑓𝑖

Flow less than demand 𝑑𝑖

Flows less than capacity 𝑐(𝑒)

Flow conservation on inner nodes

Flow definition on source, destination

Page 16: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Network Dynamics

Page 17: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Problem: Consistent Updates

target state

𝑓1𝑓2

𝑓2

𝑓1

𝑓1

𝑓2✘𝑓2

𝑓1 ✘

Page 18: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Capacity-Consistent Updates

• Not directly, but maybe through intermediate states?

• Solution: Leave a fraction 𝑠 slack on each edge, less than 1/𝑠 steps

• Example: Slack = 1/3 of link capacity,

𝑓1𝑓2

target state

𝑓2

𝑓1

Page 19: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Example: Slack = 1/3 of link capacity

𝑓1

𝑓2

target state

𝑓2

𝑓1

𝑓2 2

𝑓1

𝑓2 2

𝑓2 2

𝑓2 2

𝑓1

Page 20: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Capacity-Consistent Updates

Alternatively: Try whether a solvable LP with 𝑘 steps exist, for 𝑘 = 1, 2, 3…

(Sum of flows in steps 𝑗 and 𝑗 + 1, together, must be less than capacity limit)

𝑓𝑖0 ≤ 𝑓𝑖

𝑘

𝑖max 𝑓𝑖

𝑗𝑒 , 𝑓𝑖𝑗+1𝑒 ≤ 𝑐 𝑒

𝑢𝑓𝑖𝑗𝑢, 𝑣 =

𝑤𝑓𝑖𝑗𝑣,𝑤

𝑣𝑓𝑖𝑗(𝑠𝑖 , 𝑣) =

𝑢𝑓𝑖𝑗(𝑢, 𝑡𝑖) = 𝑓𝑖

𝑗

Only growing flows

Flow less than capacity

Flow conservation on inner nodes

Flow definition on source, destination

[Hong et al., SIGCOMM 2013]

Page 21: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Prototype Evaluation

Time [minutes]

Goodput(normalized & stacked)

Traffic: (∀DC-pair) 125 TCP flows per class

High utilization SWAN’s goodput:

98% of an optimal method

Flexible sharing Interactive protected;

background rate-adapted

optimal linedips due to rate adaptation

Page 22: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Data-driven Evaluation of 40+ DCs

Uti

lizat

ion

Page 23: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Another Problem: Straggler Switches

CDF of 100 updates on a switch, in seconds

Dionysus: Make updates dynamic, i.e., work around straggling switches

[Jin et al., SIGCOMM 2014]

Page 24: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Yet Another Problem: Memory Limits at Switches

Surprisingly, with memory limits, updates are difficult (NP-complete).

Example: We want to swap all flows between two switches 𝑢 and 𝑣.

Each switch has capacity 𝑐, and memory limit 𝑘.

[Jin et al., SIGCOMM 2014]

𝑢

𝑐/2

𝑣

𝑘 − 1 𝑘 − 1

17

11

25

3 Σ = 𝑐

Page 25: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Updating Dynamic Networks:

A Bigger Picture?

Page 26: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Consistency Space

[Mahajan & W, HotNets 2013]

Page 27: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Example

SDN Controller

Page 28: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Example

SDN Controller

v1 v2

[Reitblatt et al., SIGCOMM 2012]

Page 29: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Dependencies

Version Numbers

+ stronger packet coherence

– version number in packets

– switches need to store both versions

v1 “Better” Solution

𝑢 𝑣 𝑥 𝑦

𝑢 𝑣 𝑥 𝑦

𝑦

𝑥

Page 30: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Minimum SDN Updates?

Page 31: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Minimum Updates: Another Example

𝑤

𝑢

𝑤

𝑣

or

Page 32: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Minimum vs. Minimal

No node can improve without hurting another

node

Page 33: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Minimal Dependency Forest

Next: An algorithm to compute minimal dependency forest.

Page 34: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Algorithm for Minimal Dependency Forest

• Each node in one of three states: old, new, and limbo (both old and new)

old

newnew

old

Page 35: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Algorithm for Minimal Dependency Forest

• Each node in one of three states: old, new, and limbo (both old and new)

• Originally, destination node in new state, all other nodes in old state

• Invariant: No loop!

𝑑

Page 36: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Algorithm for Minimal Dependency Forest

Initialization

• Old node 𝑢: No loop* when adding new pointer, move node to limbo!

• This node 𝑢 will be a root in dependency forest

*Loop Detection: Simple procedure, see next slide

𝑑(no loop)

Page 37: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Loop Detection

• Will a new rule u.new = v induce a loop?

– We know that the graph so far has no loops

– Any new loop must contain the edge (u,v)

• In other words, is node u now reachable from node v?

• Depth first search (DFS) at node v

– If we visit node u: the new rule induces a loop

– Else: no loop

u v

u v

new

new

Page 38: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Algorithm for Minimal Dependency Forest

• Limbo node 𝑢: Remove old pointer (move node to new)

• Consequence: Some old nodes 𝑣 might move to limbo!

• Node 𝑣 will be child of 𝑢 in dependency forest!

𝑑(remove old)

(now: no loop)

Page 39: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Algorithm for Minimal Dependency Forest

Process terminates

• You can always move a node from limbo to new.

• Can you ever have old nodes but no limbo nodes? No, because…

…one can easily derive a contradiction!

new

𝑑old

new!

Page 40: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

For a given consistency property, what is the minimal dependency possible?

Page 41: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Consistency Space

[Mahajan & W, HotNets 2013]

Page 42: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Multiple Destinations using Prefix-Based Routing

• No new “default” rule can be introduced without causing loops

• Solution: Rule-Dependency Graphs!

• Deciding if simple update schedule exists is hard!

Page 43: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Breaking Cycles

Insert 𝑢𝑤 Remove 𝑢𝑣 Insert 𝑣𝑢

Insert 𝑤𝑣 Remove 𝑣𝑤Remove 𝑤𝑢

Insert at 𝑤:dest 𝑣: 𝑤𝑣

Remove at 𝑤: dest 𝑣: 𝑤𝑣

Page 44: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Summary

Page 45: Managing Dynamic Networks: Distributed or Centralized … and DSDN 2014 without...Loop Detection • Will a new rule u.new = v induce a loop? – We know that the graph so far has

Thank You!Questions & Comments?

www.disco.ethz.ch