Lecture 10: Network-layer DHTs

39
Lecture 10: Network-layer DHTs CS 598: Advanced Internetworking Matthew Caesar March 16, 2011 1

Transcript of Lecture 10: Network-layer DHTs

Page 1: Lecture 10: Network-layer DHTs

Lecture 10: Network-layer DHTs

CS 598: Advanced Internetworking

Matthew Caesar

March 16, 2011

1

Page 2: Lecture 10: Network-layer DHTs

Postal Service

Scenario: Sending a Letter

A B

3400 Walnut St. Philadelphia, PA 19104

Address:

450 Lancaster Ave. 3400 Walnut St.

900 Spruce St.

Name: B

Page 3: Lecture 10: Network-layer DHTs

Scenario: Address Allocation

19104

19107A B

450 Lancaster Ave. 3400 Walnut St.

19105

3400 Walnut St. Philadelphia, PA19104

Address:Name: B

Page 4: Lecture 10: Network-layer DHTs

Scenario: Access Control

3400 Walnut St.

“Inspect mail to 3400 Walnut St.”

C

DName: C

Postal Service3400 Walnut St.

900 Spruce St.

450 Lancaster Ave.

3400 Walnut St. Philadelphia, PA19104

Address: 900 Spruce St. Philadelphia, PA 19104

Address:Name: C

Name: C

Page 5: Lecture 10: Network-layer DHTs

How Routing Works Today

B K

QV

• Each node has an identity• Goal: find path to destination

Send(msg,Q)

J

SF

X

A

Page 6: Lecture 10: Network-layer DHTs

Area 1

Area 2

Area 4

Scaling Requires Aggregation

B K

QV

1.1 1.2

2.12.2

Area 4

Area 3

• Pick addresses that depend on location• Aggregation provides excellent scaling properties• Key is topology-dependent addressing!

J

SF

X

A 4.2

4.1

3.33.2

3.1

Page 7: Lecture 10: Network-layer DHTs

Topology-Dependent Addresses Aren’t Always Possible

• Networks can’t use topology-dependent addresses because topology changes so rapidly

• Decades-long search for scalable routing algorithms for ad hoc networks

Page 8: Lecture 10: Network-layer DHTs

Topology-Dependent Addresses Aren’t Always Desirable

• Using topology-based addresses in the Internet complicates access controls, mobility, and multihoming

• Would like to embed persistent identities into network-layer addresses

Page 9: Lecture 10: Network-layer DHTs

Can We Scale without Topology-Dependent Addresses?

• Is it possible to scale without aggregation?

• Distributed Hash Tables don’t solve this • Distributed Hash Tables don’t solve this problem

Page 10: Lecture 10: Network-layer DHTs

This Talk

• Will describe how to route scalably on flat identifiers that applies to both:

• Wireless networks:• Wireless networks:

– Challenge is dynamics

• Wired networks:

– Challenge is scale, policies, and dynamics

Page 11: Lecture 10: Network-layer DHTs

Outline

• Routing on an abstract graph

–What state is maintained

–How to route using that state

–How to correctly maintain state–How to correctly maintain state

• Wireless sensornet implementation

• Evaluation for Internet routing

• Conclusions

Page 12: Lecture 10: Network-layer DHTs

State maintained at each node

A F J K Q S V X

J

K

F

Virtual topology

F

A

JV

X

J

K Q

F

V

A

S

Network topology

X

JF

1. Write down sorted list of IDs

2. Build paths between neighbors in list

J

KQ

V

S

Page 13: Lecture 10: Network-layer DHTs

How to forward packets

Virtual topology

F

A

JV

XQ

J

K

F

J

K Q

F

V

A

S

Network topology

X

J

KQ

V

S Send(K,F)

JF

Page 14: Lecture 10: Network-layer DHTs

The stretch problem

Virtual topology

F

A

JV

X

J FX

V

Resulting path length: 10 hops

J

K Q

F

V

A

S

Network topology

X

J

KQ

V

S

Send(J,V)

J FA

Shortest path length: 3 hops

Page 15: Lecture 10: Network-layer DHTs

Optimization: shortcutting

Virtual topology

F

A

JV

X

Resulting path length: 4 hops

J FX

V

X

J

K Q

F

V

A

S

Network topology

X

J

KQ

V

S

Send(J,V)

Shortest path length: 3 hops

J FA

Page 16: Lecture 10: Network-layer DHTs

A summary so far…

• The algorithm has two parts

– Route linearly around the ring

– Shortcut when possible

• Up next, the technical details…

Page 17: Lecture 10: Network-layer DHTs

Joining a new node

B

K

F

F

A

JV

X

Virtual topology

{A,F,J}

B

J

K Q

F

V

X

A

Network topology

S

B

JF

Join(B)

J

KQ

V

S

Page 18: Lecture 10: Network-layer DHTs

How to maintain state

F

F

A

JV

X

Virtual topology Goal #2:

Ensure each pointer path points to correct global successor/predecessor

J

K Q

F

V

X

A

Network topology

S

JFJ

KQ

V

S

Goal #1:Ensure each pointer path is properly maintained

Page 19: Lecture 10: Network-layer DHTs

Path maintenance

(id F,nh X )

(id F,nh P )

(id F,nh A )

(id F,nh S )

(id F,nh F )

(id F,nh F )

J FVirtual link

• Nodes maintain (endpoint ID, next hop) pairs per-path• Local fault detection, teardowns remove path state• Local repair sometimes possible

J PX SA F

nh X ) nh P ) nh A ) nh S ) nh F ) nh F )

Network topology

Page 20: Lecture 10: Network-layer DHTs

Path maintenance

(id F,Nh X )

(id F,nh P )

(id F,nh Annh S)

(id F,nh S )

(id F,nh F )

(id F,nh F )

(id F,nh Hnnh S)

J FVirtual link

• Nodes maintain (endpoint ID, next hop) pairs per-path• Local fault detection, teardowns remove path state• Local repair sometimes possible

J PX SA F

Nh X ) nh P ) nnh S) nh S ) nh F ) nh F )

H

Network topology

Page 21: Lecture 10: Network-layer DHTs

Challenges of ring maintenance

F

Q

V

B

K

X

J J

F

KQ

V

X B

• Need to ensure network-level events don’t cause ring partitions, misconvergence

J

K Q

F

V

X

B

K

Page 22: Lecture 10: Network-layer DHTs

Ring maintenance

• Base mechanism:

– Discover node Z closest to zero position, distributes Z’s ID throughout partition

• Inductive mechanism:

Z0

S

• Inductive mechanism:

– Set N’s successor to be the closest among:

• N’s current successor

• N’s successor’s predecessor

• The zero node Z

NSS.pred

Page 23: Lecture 10: Network-layer DHTs

[k+1…0]

Ring maintenance: proof sketch

• Consider ring with nodes {0…N}, assume routing has converged

• Base case: N’s successor must point to 0

• Inductive step: k-1 must point to k

0N

[1…k-2]

• Inductive step: k-1 must point to k– if k-1 points to S in [k+1…0], S would inform k-1 about S-1� not converged

– if k-1 points to S in [1…k-2], then k-1 would change to point to zero node 0 � not converged

k k-1

Reachability property: If there is a network level path between two nodes A and B, A can route to B via the ring

Page 24: Lecture 10: Network-layer DHTs

Outline

• Introduction

• Routing on an abstract graph

• Wireless sensornet implementation

– Motivation behind using flat IDs– Motivation behind using flat IDs

– Methodology: sensornet implementation

– Results from deployment

• Evaluation for Internet routing

• Conclusions

Page 25: Lecture 10: Network-layer DHTs

Why flat IDs for wireless?

• Multihop wireless networks on the horizon

– Rooftop networks, sensornets, ad-hoc networks

• Flat IDs scale in dynamic networks• Flat IDs scale in dynamic networks

– No location service needed

– Flood-free maintenance reduces state, control traffic

• Developed and deployed prototype implementation for wireless sensornets

– Extensions: failure detection, link-estimation

Page 26: Lecture 10: Network-layer DHTs

Methodology

• TinyOS implementation: Virtual Ring Routing (VRR)– Deployment on testbed: 67 mica2dot motes (4KB

memory, 19.2kbps radio)

– Compared with Beacon Vector Routing (BVR), AODV, DSR

• Metrics: Delivery ratio, control overhead

Page 27: Lecture 10: Network-layer DHTs

Effect of node failure

70

80

90

100

110

Num

ber

of n

odes

0.9

0.95

1

Del

iver

y ra

tio

Number of nodesBVR delivery ratioVRR delivery ratio

Nu

mb

er o

f no

des

• Both VRR and BVR perform well

• BVR’s performance degrades because of coordinate instability and overhead to recover from failures

50

60

70

0 5 10 15 20

Time (mins)

Num

ber

of n

odes

0.8

0.85

Del

iver

y ra

tio

VRR delivery ratio

Time [mins]

Nu

mb

er o

f no

des

Page 28: Lecture 10: Network-layer DHTs

Transmission overhead

Nu

mb

er o

f no

des

0.85

0.9

0.95

1

Fra

ctio

n of

pac

kets

VRRBVR

• Flat routing requires no scoped flooding, which reduces transmission overhead

Time [mins]

Nu

mb

er o

f no

des

0.8

0.85

0 20 40 60 80

Messages per data packet

Fra

ctio

n of

pac

kets

BVR

Page 29: Lecture 10: Network-layer DHTs

Effect of congestion

4

5

6

7

8

9

Sen

d ra

te [

pkts

/sec

]

0.96

0.98

1

Del

iver

y ra

tio

Packets/secVRR delivery ratioBVR delivery ratio

• Flat-routing resilient to congestion losses, since identifiers topology-independent

0

1

2

3

1 3 5 7 9 11 13 15 17 19

Time [mins]

Sen

d ra

te [

pkts

/sec

]

0.92

0.94

Del

iver

y ra

tio

Page 30: Lecture 10: Network-layer DHTs

Outline

• Introduction

• Routing on an abstract graph

• Wireless sensornet implementation

• Evaluation for Internet routing• Evaluation for Internet routing

– Motivation behind using flat IDs

– Extensions to support policies, improve scaling

– Performance evaluation on Internet-size graphs

• Conclusions

Page 31: Lecture 10: Network-layer DHTs

Why flat IDs for the Internet?

• Today’s Internet conflates addressing with identity

• Flat IDs sidestep this problem completelycompletely

– Provides network routing without any mention of location

– Benefits: no need for name resolution service, simpler configuration, simpler access controls

Page 32: Lecture 10: Network-layer DHTs

Challenges of Internet routing

• Internet routing is very different from wireless routing

– Challenges: policies, scaling

• Need new mechanisms to deal with these challenges

– Policy-safe successor paths

– Locality-based pointer caching

Page 33: Lecture 10: Network-layer DHTs

Flat IDs for Internet routing

ISPISP0x3BAC8

0x3F6C0Pointer cache: 0x3B57E

2. hosting routersparticipate in protocol on behalf of hosts

4. intermediate routers may cache pointers

ISPISP

0xFA2910x3B57E(joining host)

0x3F6C0

0x3BAC80x3B57E

Successor list: 0x3F6C0

Pointer list: 0x3F6C00x3BAC8

0x3B57E

3. hosting routers maintain pointers with source-routesto attached hosts’ successors/fingers

5. external pointersprovide reachability across domains

1. hosts are assigned topology-independent “flat” identifiers

0x3BAC8

Page 34: Lecture 10: Network-layer DHTs

hierarchy #1 hierarchy #2 hierarchy #3

peer link

Internet policies today

Prefer customer over peer routes

Do not export providerroutes to peers

• Economic relationships: peer, provider/customer• Isolation: routing contained within hierarchy• Economic relationships: peer, provider/customer• Isolation: routing contained within hierarchy

Source Destination

Page 35: Lecture 10: Network-layer DHTs

Isolation

Isolation property: traffic between two hosts traverses no higher than their lowest common provider in the ISP hierarchy

Joininghost

InternalSuccessor

ExternalSuccessor

ExternalSuccessor

Source Destination

Page 36: Lecture 10: Network-layer DHTs

Policy support

Mechanism:Convert peeringrelationships to Virtual ASes

A

VirtAS

AGoal: prefer peer

route over provider route

B CPeering link

• Peering• Provider-customer• Backup

Traffic respects peering, backup, and provider-customer relationships

Source Destination Source Destination

CB

Page 37: Lecture 10: Network-layer DHTs

Evaluation

• Distributed packet-level simulations– Deployed on cluster across 62 machines, scaled to 300 million hosts

– Inferred Internet topology from Routeviews, Rocketfuel, CAIDA skitter tracesRouteviews, Rocketfuel, CAIDA skitter traces

• Implementation– Ran on Planetlab as overlay, covering 82 ASes

– Configured inter-ISP policies from Routeviews traces

• Metrics: stretch, control overhead

Page 38: Lecture 10: Network-layer DHTs

Internet-scale simulations

1.2

1.4

1.6

1.8

2

2.2

2.4

Str

etch

With caching

No caching

50

100

150

200

250

Join

ove

rhea

d [m

sgs] Peering

MultihomingSinglehomingEphemeral

Full-scale

• Join overhead <300 msgs, stretch < 1.4

• Root-server lookups inflate latency from 54ms to 134ms, Flat IDs has no penalty

1

1.2

1 100 10000 1E+06 1E+08 1E+10

Number of hosts

0

1 100 10000 1E+06 1E+08 1E+10

Number of hosts

Join

ove

rhea

d [m

sgs]

Page 39: Lecture 10: Network-layer DHTs

Summary

• Identity-based routing is practical

– Scalable, correct, converges quickly

• Identity-based routing offers benefits• Identity-based routing offers benefits

– Simplifies architecture and maintenance

• More recent work:

– Singla et al., “Scalable Routing on Flat Names,” CoNEXT 2010