![Page 1: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/1.jpg)
OVERLAY NETWORKS
![Page 2: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/2.jpg)
Outline
Overlay network concept
Case study :Distributed Hash table
(DHT)
![Page 3: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/3.jpg)
Outline
Overlay network concept
Case study :Distributed Hash table
(DHT)
![Page 4: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/4.jpg)
Overlay networks concept
• Motivations for overlay networks– Customized routing and forwarding solutions– Incremental deployment of new protocols
![Page 5: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/5.jpg)
Overlay networks concept
![Page 6: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/6.jpg)
Overlay networks concept
Focus at the application level
![Page 7: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/7.jpg)
Overlay networks concept
7
• IP tunnel is a virtual point-to-point link– Illusion of a direct link between two separated nodes
• Encapsulation of the packet inside an IP datagram– Node B sends a packet to node E– … containing another packet as the payload
A B E FtunnelLogical view:
Physical view:A B E F
![Page 8: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/8.jpg)
Customized routing and forwarding
8
A
C
B
Src: ADest: B
Src: ADest: B
Src: ADest: C
Src: ADest: B
Src: CDest: B
![Page 9: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/9.jpg)
Overlay networks concept
• A logical network built on top of a physical network– Overlay links are tunnels through the underlying network
• Many logical networks may coexist at once– Over the same underlying network– And providing its own particular service
• Nodes are often end hosts– Acting as intermediate nodes that forward traffic– Providing a service, such as access to files
![Page 10: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/10.jpg)
Circumventing Policy Restrictions
• IP routing depends on AS routing policies– But hosts may pick paths that circumvent policies
AT&T
PU Patriot
ISP
meMy buddy’s computer
![Page 11: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/11.jpg)
Adapting to Network Conditions
11
• Start experiencing bad performance– Then,start forwarding through intermediate host
A
C
B
![Page 12: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/12.jpg)
Customizing to Applications
12
• VoIP traffic: low-latency path• File sharing: high-bandwidth path
A
C
B
voice
file sharing
![Page 13: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/13.jpg)
Incremental Deployment
• Internet needs to evolve– IPv6– Security– Mobility– Multicast
• But, global change is hard– Coordination with many ASes– “Flag day” to deploy and enable the technology
• Instead, better to incrementally deploy– And find ways to bridge deployment gaps
![Page 14: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/14.jpg)
Incremental DeploymentA B E F
IPv6 IPv6 IPv6 IPv6
tunnelLogical view:
Physical view:A B E F
IPv6 IPv6 IPv6 IPv6
C D
IPv4 IPv4
Flow: XSrc: ADest: F
data
Flow: XSrc: ADest: F
data
Flow: XSrc: ADest: F
data
Src:BDest: E
Flow: XSrc: ADest: F
data
Src:BDest: E
A-to-B:IPv6
E-to-F:IPv6
B-to-C:IPv6 insideIPv4
B-to-C:IPv6 insideIPv4
![Page 15: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/15.jpg)
Incremental Deployment
15
• Multicast– Delivering the same data to many receivers– Avoiding sending the same data many times
unicast multicast
![Page 16: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/16.jpg)
Outline
Overlay network concept
Case study :Distributed Hash table
(DHT)
![Page 17: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/17.jpg)
Hash Table
• Name-value pairs (or key-value pairs)– E.g,. “Amin” and [email protected]– E.g., “www.cnn.com” and the Web page– E.g., “BritneyHitMe.mp3” and “12.78.183.2”
• Hash table– Data structure that associates keys with values
![Page 18: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/18.jpg)
Distributed Hash Table
• Hash table spread over many nodes– Distributed over a wide area
• Main design goals– Decentralization: no central coordinator– Scalability: efficient even with large # of nodes– Fault tolerance: tolerate nodes joining/leaving
• Two key design decisions– How do we map names on to nodes?– How do we route a request to that node?
![Page 19: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/19.jpg)
Hash Functions
• Hashing– Transform the key into a number– And use the number to index an array
• Example hash function– Hash(x) = x mod 101, mapping to 0, 1, …, 100
• Challenges– What if there are more than 101 nodes? Fewer?– Which nodes correspond to each hash value?– What if nodes come and go over time?
![Page 20: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/20.jpg)
Consistent Hashing
• Large, sparse identifier space (e.g., 128 bits)– Hash a set of keys x uniformly to large id space– Hash nodes to the id space as well
0 1
Hash(name) object_idHash(IP_address) node_id
Id space represented as a ring.
2128-1
![Page 21: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/21.jpg)
Where to Store (Key, Value) Pair?
• Mapping keys in a load-balanced way– Store the key at one or more nodes– Nodes with identifiers “close” to the key – Where distance is measured in the id space
• Advantages– Even distribution– Few changes as
nodes come and go…
Hash(name) object_idHash(IP_address) node_id
![Page 22: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/22.jpg)
Nodes Coming and Going
• Small changes when nodes come and go– Only affects mapping of keys mapped to the node that comes or goes
Hash(name) object_idHash(IP_address) node_id
![Page 23: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/23.jpg)
Joins and Leaves of Nodes
• Maintain a circularly linked list around the ring– Every node has a predecessor and successor
node
pred
succ
![Page 24: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/24.jpg)
Joins and Leaves of Nodes
• When an existing node leaves– Node copies its <key, value> pairs to its predecessor– Predecessor points to node’s successor in the ring
• When a node joins– Node does a lookup on its own id– And learns the node responsible for that id– This node becomes the new node’s successor– And the node can learn that node’s predecessor (which will become the new node’s predecessor)
![Page 25: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/25.jpg)
How to Find the Nearest Node?
• Need to find the closest node– To determine who should store (key, value) pair– To direct a future lookup(key) query to the node
• Strawman solution: walk through linked list– Circular linked list of nodes in the ring– O(n) lookup time when n nodes in the ring
• Alternative solution: – Jump further around ring– “Finger” table of additional overlay links
![Page 26: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/26.jpg)
Links in the Overlay Topology
1/2
1/4
1/8
![Page 27: Overlay network concept Case study: Distributed Hash table (DHT) Case study: Distributed Hash table (DHT)](https://reader035.vdocuments.site/reader035/viewer/2022062308/56649e875503460f94b8a6a4/html5/thumbnails/27.jpg)
The End
ANYQUESTIONS
?