Routing on Overlay Networks

advertisement
Routing on Overlay
Networks
EECS 228
Abhay Parekh
parekh@eecs.berkeley.edu
October 28, 2002
What is an overlay network?
T
T
T
A network defined over another set of networks
The overlay addresses its own nodes
Links on one layer are network segments of lower
layers
Y
T
T
Requires lower layer routing to be utilized
A
A’ A
Overlaying mechanism is called tunneling
Example: Virtual Private Networks
Y
Y
Y
Y
Virtual topology defined via VPN nodes
Telecommuters appear as though they are on the
corporate network
Sessions are more secure
Bits may traverse various kinds of underlying networks
T
PSTN, Frame Relay etc.
October 28, 2002
Abhay K. Parekh: Topics in Routing
2
Routing On the overlay
Underlying
Network
October 28, 2002
Abhay K. Parekh: Topics in Routing
3
Routing on the Overlay
T
The underlying network induces a
complete graph of connectivity
Y
No routing required!
Underlying
Network
October 28, 2002
Abhay K. Parekh: Topics in Routing
4
Routing on the Overlay
T
The underlying network induces a
complete graph of connectivity
Y
10
T
200
But
Y
100
90
90
10
Y
100
100
20
No routing required!
Y
One virtual hop may be many
underlying hops away.
Latency and cost vary significantly over
the virtual links
State information may grow with E
(n^2)
10
October 28, 2002
Abhay K. Parekh: Topics in Routing
5
Routing Issues
T
The underlying network induces a
complete graph of connectivity
Y
T
But
Y
Y
Underlying
Network
Y
T
One virtual hop may be many
underlying hops away.
Latency and cost vary significantly over
the virtual links
State information may grow with E
(n^2)
At any given time, the overlay network
picks a connected sub-graph based
on nearest neighbors
Y
Y
October 28, 2002
No routing required!
How often can vary
Also, structured (Chord) v/s
unstructured (Gnutella)
Abhay K. Parekh: Topics in Routing
6
Routing Issues
T
1
2
The underlying network induces a
complete graph of connectivity
Y
T
But
Y
Y
3
Y
4
5
T
Y
October 28, 2002
One virtual hop may be many
underlying hops away.
Latency and cost vary significantly over
the virtual links
State information may grow with E
(n^2)
At any given time, the overlay network
picks a connected sub-graph based
on nearest neighbors
Y
T
No routing required!
How often can vary
Also, structured (Chord) v/s
unstructured (Gnutella)
The overlay network must ROUTE!
Abhay K. Parekh: Topics in Routing
7
Routing Issues
T
1
2
4
5
Overlay network users
may not be directly
connected to the overlay
nodes
T
E.g. Akamai
3
October 28, 2002
Abhay K. Parekh: Topics in Routing
8
Overlay Routing: Edge Mapping
T
1
Overlay network users may
not be directly connected to
the overlay nodes
T
2
T
T
IP(5)
3
User must be redirected to a
“close by” overlay node
Edge-Mapping, or redirection
function is hard since
Y
Y
?
4
5
T
# potential users enormous
User clients not under direct
control
When overlay clients are
directly connected the edge
mapping function is obviated
Y
October 28, 2002
E.g. Akamai
Abhay K. Parekh: Topics in Routing
E.g. P2P: users/nodes
colocated
9
Overlay Routing: Edge Mapping
T
T
1
2
Overlay nodes interconnect
clients
Enhance nature of connection
Y
Y
Y
T
IP(5)
3
Multicast
Secure
Low Loss
Much easier to add
functionality than to integrate
into a router
?
4
October 28, 2002
5
Abhay K. Parekh: Topics in Routing
10
Overlay Routing: Adding Function to the
route
T
T
1
2
Overlay nodes interconnect
clients
Enhance nature of connection
Y
Y
Y
T
3
T
4
October 28, 2002
Multicast
Secure
Low Loss
Much easier to add
functionality than to integrate
into a router
Overlay nodes can become
bottlenecks
5
Abhay K. Parekh: Topics in Routing
11
Overlay Routing: Resource Location
T
Overlay network may contain
resources. Eg.
Y
1
2
Y
T
B
D
E
B
F
T
3
B?
4
October 28, 2002
Client makes request for
resource
Overlay must “search” for
“closest” node that has the
resource
Y
5
A
B
C
Servers
Files
E.g. find the least loaded
server that has a piece of
content and that is has low
network latency to client
A
D
Abhay K. Parekh: Topics in Routing
12
Overlay Routing: Resource Location
T
D
Y
B
1
2
Y
T
B
B
F
D
E
F
C
T
3
A
C
D
E
4
A
D
T
T
October 28, 2002
Abhay K. Parekh: Topics in Routing
Servers
Files
Client makes request for
resource
Overlay must “search” for
“closest” node that has the
resource
Y
B?
5
A
B
C
Overlay network may contain
resources. Eg.
E.g. find the least loaded
server that has a piece of
content and that is has low
network latency to client
A single “index” is not
scalable
Overlay launches a query to
locate resource
13
Overlay Routing: Resource Location
T
D
Y
B
1
2
Y
T
B
B
F
D
E
F
C
T
3
A
C
D
E
4
A
D
T
T
T
October 28, 2002
Abhay K. Parekh: Topics in Routing
Servers
Files
Client makes request for
resource
Overlay must “search” for
“closest” node that has the
resource
Y
B?
5
A
B
C
Overlay network may contain
resources. Eg.
E.g. find the least loaded
server that has a piece of
content and that is has low
network latency to client
A single “index” is not
scalable
Overlay launches a query to
locate resource
Query is “Routed” through the
overlay until object is located
14
Overlay Routing: Resource Location
T
D
Y
B
1
2
Y
T
B
B
F
D
E
4
F
C
T
3
4
A
C
D
E
4
5
A
B
C
A
D
4
T
T
Abhay K. Parekh: Topics in Routing
Servers
Files
Client makes request for
resource
Overlay must “search” for
“closest” node that has the
resource
Y
B?
T
October 28, 2002
Overlay network may contain
resources. Eg.
E.g. find the least loaded
server that has a piece of
content and that is has low
network latency to client
A single “index” is not
scalable
Overlay launches a query to
locate resource
Query is “Routed” through the
overlay until object is located
15
Overlay Routing: Resource Location
T
D
Y
B
1
2
Y
T
B
B
F
D
E
4
F
C
T
3
4
A
C
D
E
4
5
A
B
C
A
D
4
T
T
Abhay K. Parekh: Topics in Routing
Servers
Files
Client makes request for
resource
Overlay must “search” for
“closest” node that has the
resource
Y
B?
T
October 28, 2002
Overlay network may contain
resources. Eg.
E.g. find the least loaded
server that has a piece of
content and that is has low
network latency to client
A single “index” is not
scalable
Overlay launches a query to
locate resource
Query is “Routed” through the
overlay until object is located
16
Summary
T
Two kinds of overlays functions
Y
Y
T
Two kinds of virtual topologies
Y
Y
T
Y
Direct: P2P
Not direct: Akamai
Overlay Network Functions
Y
Y
Y
Y
T
Structured
Unstructured
Two kinds of client connectivty
Y
T
Overlay contains resources
Overlay facilitates communication among other client applications
Select Virtual Edges (fast or slow timescales)
Overlay Routing Protocol
Edge Mapping
Resource Location
Edge Mapping and Resource Location can be combined
October 28, 2002
Abhay K. Parekh: Topics in Routing
17
Example: Application Level Multicast
Content Producer
Media Distribution
Network
Content Producer
October 28, 2002
Media Clients
Abhay K. Parekh: Topics in Routing
18
The Broadcast Internet
Content Producer
Content Producer
October 28, 2002
Abhay K. Parekh: Topics in Routing
19
Broadcast Overlay Architecture
Management Platform
content management
Media Delivery
System
Redirection
October 28, 2002
Abhay K. Parekh: Topics in Routing
injection & real-time control
network management
monitoring & provisioning
server management
redirection management
load balancing
system availability
viewer management
subscriptions, PPV,
monitoring, Neilson ratings,
targeted advertising
20
Broadcast Management
T
T
T
T
October 28, 2002
Abhay K. Parekh: Topics in Routing
Scales to millions
Application-level
information for
management and
tracking
Works across multiple
networks
Content Producer
event programming
with ad-hoc query
audience statistics
21
Broadcast Manager
Node
Information
Stream
Switchover
October 28, 2002
Abhay K. Parekh: Topics in Routing
22
Policy Management
October 28, 2002
Abhay K. Parekh: Topics in Routing
23
Example: Content Addressable P2P
Networks (CAN)
T
T
T
Ratnaswamy et. al
First generation P2P (Napster, Gnutella not
scalable)
CAN is one of several recent P2P architectures that
Y
Y
impose a structure on the virtual topology
locate objects via distributed hash tables DHT
T
Y
Y
T
Routes queries through the structured overlay
attempt to distribute (object, location) pairs uniformly
throughout the network
support object lookup, insertion and deletion of objects
efficiently.
Others: Chord, Pastry, Tapestry
October 28, 2002
Abhay K. Parekh: Topics in Routing
24
CAN Virtual Topology
T
T
T
T
Pick a uniform hash function that
maps an object to a point in [0,1]d.
Divide the d-cube into zones and
assign a node to a zone
Store (object,location) pair in the
zone that owns the zone for the
hashed value of the object.
The neighbors of a zone are
defined as those nodes whose
zones overlap over d-1
dimensions
Y
Y
October 28, 2002
Neighbors of C are A and D
Each node stores the addresses
of its neighbors
Abhay K. Parekh: Topics in Routing
25
CAN Routing
T
T
T
T
October 28, 2002
If node i wants to find out where
object j is stored, it computes h(j) and
then sends a lookup message to its
neighbor that is closest to h(j). For
efficiency assume that the space
wraps around (is a torus)
This continues until the message
reaches the node that owns h(j). It
then returns the location for object j
For n equal zones in a d-CAN, each
zone has about 2d neighbors
Routing path lengths are O(n-d).
Abhay K. Parekh: Topics in Routing
26
Adding/Deleting nodes
T
T
T
T
T
October 28, 2002
New node picks a point P at
random
Assuming it can find some
overlay node, it sends a join
message which is routed to the
node that owns that point
When the message has
reached P, the node divides
itself in half along one of the
dimensions (first x then y etc)
Pairs are transferred and
neighbor sets updated
Similar reasoning handles
departures and failures
Abhay K. Parekh: Topics in Routing
27
Relating Virtual Topology to the
Underlying Network
T
T
T
Example:
Three landmarks
Y
Y
Y
T
T
T
0-30ms: level 0
31-100ms: level 1
101-300ms: level 2
Node j measures
latencies of 10ms,
110ms, 40ms to the
three landmarks.
The bin of node j is
Y
T
Neighbors should be close to
each other in terms of latency
on the underlying network
Pick a set of well known
landmark hosts
Each node distributively
computes its “bin”
Y
Y
Y
(l1,l3,l2 : 021)
Y
October 28, 2002
Orders the landmark set in
increasing order of RTT from it.
Latency is partitioned into
levels
Thus, associated with each
landmark, at each node is a
rank and a level.
These values identify the bin
Abhay K. Parekh: Topics in Routing
28
Constructing the CAN overlay from Bins
T
Let us say that there are B bins possible
Y
T
T
T
E.g. ignoring levels and assuming m landmarks there are
B=m! bins
Partition the CAN space into B equal parts
Allocate nodes in bin b to points at random in the
space corresponding to b.
Popular values of b will have more neighbors
Y
Y
Space not uniformly populated – State requirements could
be higher
But the overlay routing paths will be more comensurate to
the underlying network latencies
October 28, 2002
Abhay K. Parekh: Topics in Routing
29
Constructing Overlays with the Small
World Property
T
T
T
Suppose you were given the name of a person randomly chosen
from anywhere in the world.
How long is the “acquaintance chain” between you and this person?
Stanley Miligram (kind of) showed empirically that on average the
answer is SIX, even though
Y
Y
most people don’t know that many people (small # of neighbors)
there is considerable overlap between the people two aquaintences
know (neighborhoods overlap)
T
The small world property is great for routing!
T
Need
Y The right topology
Y A distributed routing algorithm to exploit the topology
October 28, 2002
Abhay K. Parekh: Topics in Routing
30
What are the requirements on the
Topology?
T
T
T
Must have
Y Low average degree
Y Small diameter
Y Neighborhood overlap (Clustering)
Two extreme topologies
Y Random graphs have the small world
effect (small avg distance) but no
clustering
Y D-Lattice has all three properties but does
not have the small world effect
Watts and Strogatz
Y Rewired lattice. Replace some lattice
links with random edges (long range
neighbors)
Y Possess the small world property
Y Path is polynomial in log n
October 28, 2002
Abhay K. Parekh: Topics in Routing
31
General Model Model… J. Kleinberg
T
2x2 grid, and p,q,r
Y
Y
Y
T
Question: If a message is to be routed
between two nodes that have local
information how many hops would it
take on average?
Y
T
T
Each node has an edge to all of its
neighbors p hops away
Each node has q edges picked such that
prob that (j,k) is an edge is inversely
proportional to d(j,k)^r
r=0 yields the Watts Strogatz Model
p=1, q=0
Should be at least polynomial in log n
When routing table size constraints
exist this is a critical question!
Suppose the originating node knows its
neighbors and the grid
Y
Y
Best routing algorithm is exponential in
minimum distance UNLESS r=2.
Result holds even if the each node also
knows the set of q edges thus far
traversed by the message!!
p=1, q=2
October 28, 2002
Abhay K. Parekh: Topics in Routing
32
Intuition for negative result for extreme
values of r
T
T
T
T
T
Picking the “right” long contacts is crucial
Chances are, need to pick several long contacts
Distributed algorithm is “blind” in this respect
If r<<2, the long contacts have very little to do with
the grid, and can lead message on a “random” walk
If r>>2, the long contacts are too clustered and are
actually “short” themselves
October 28, 2002
Abhay K. Parekh: Topics in Routing
33
Somewhat finer grained reasoning
T
Level sets from node u:
Y
T
When r=2, u’s long contacts are equally likely to be
in any Aj
Y
T
T
Aj is the set of nodes whose dist from dest is between 2j+1
and 2j
A greedy algorithm that tries to route towards the
destination has a good chance of being able to pick a
useful long contact
When r>2, bias is towards closer Aj’s so once far
message tends to stay far for a while
When r<2 bias is towards further Aj’s so even after
the message is close, it may have to move away
further (jump away) from the destination
October 28, 2002
Abhay K. Parekh: Topics in Routing
34
Recall Routing Subfunctions…
T
Addressing: Uniquely identify the nodes
Y
Y
T
Topology Update: Characterize and maintain connectivity
Y
Y
Y
T
T
Discover topology
Measure “distance” metric(s)
Dynamically provision (on slower timescale)
Destination Discovery: Find node identifiers of the destination set
Route Computation: Pick the tree (path)
Y
Y
Y
Y
T
host IP address, group address, attributes
set is dynamic!
Kind of path: Multicast, Unicast
Global or Distributed Algorithm
Policy
Hierarchy
Switching: Forward the packets at each node
October 28, 2002
Abhay K. Parekh: Topics in Routing
35
Routing Subfunctions…
T
Addressing: Uniquely identify the nodes
Y
Y
T
Topology Update: Characterize and maintain connectivity
Y
Y
Y
T
T
Discover topology
Measure
“distance”
metric(s)
Add/Insert
Nodes,
Binning
Dynamically provision (on slower timescale)
Destination Discovery: Find
node identifiers
destination
Resource
Location of the
Edge
Mapping set
Route Computation: Pick the tree (path)
Y
Y
Y
Y
T
host IP address, group address, attributes
setStructured
is dynamic!Topology
Kind of path: Multicast, Unicast
Application Level Routing. E..g streaming broadcast
Global or Distributed Algorithm
Structured Topology
Policy
Hierarchy
Switching: Forward the packets at each node
October 28, 2002
Abhay K. Parekh: Topics in Routing
36
Overlay Effectiveness: Performance v/s
New Function
T
T
Overlays add new functions to the network
infrastructure much faster than by trying to integrate
them in the router
But when they are in the path (process every
packet)
Y
Y
Y
T
Overlay nodes can create performance bottlenecks
New end-to-end protocols may not work
Peer-to-Peer networks in which the overlay nodes are end
hosts of the underlying network are not in the path
Generally better to improve performance by building
an “underlay” and add functionality by building an
overlay
October 28, 2002
Abhay K. Parekh: Topics in Routing
37
Routing Lectures Summary
T
T
T
T
T
T
T
T
Routing is the most critical function of a network
For it to scale it must be distributed and resilient to topological
changes
Routing in large systems is hierarchical for reasons of
performance, administration and governance
It is currently unknown how to design a robust routing protocol
that yields low latency paths and that takes into account the
dynamic nature of a large network
It is currently unknown how to design a policy routing protocol for
the internet that is resilient to router misconfiguration
Overlay networks are quick and effective ways to add new
functionality to the network
The central problem in designing P2P networks involves solving
a distributed search problem that involves routing.
Routing is a wide open research area
October 28, 2002
Abhay K. Parekh: Topics in Routing
38
Download