P2P: Distributed Hash Tables

Similar documents
Scalability In Peer-to-Peer Systems. Presented by Stavros Nikolaou

Peer-to-Peer: Part II

Chord: A Scalable Peer-to-peer Lookup Service For Internet Applications

Motivation. The Impact of DHT Routing Geometry on Resilience and Proximity. Different components of analysis. Approach:Component-based analysis

The Impact of DHT Routing Geometry on Resilience and Proximity. Acknowledgement. Motivation

Finding Data in the Cloud using Distributed Hash Tables (Chord) IBM Haifa Research Storage Systems

: Scalable Lookup

Distributed Hash Table

Distributed Hash Tables

Comparing the performance of distributed hash tables under churn

CIS 700/005 Networking Meets Databases

Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications

Finding Data in the Cloud using Distributed Hash Tables (Chord) IBM Haifa Research Storage Systems

CS 268: DHTs. Page 1. How Did it Start? Model. Main Challenge. Napster. Other Challenges

L3S Research Center, University of Hannover

CSE 486/586 Distributed Systems

Building a low-latency, proximity-aware DHT-based P2P network

Peer to Peer I II 1 CS 138. Copyright 2015 Thomas W. Doeppner, Rodrigo Fonseca. All rights reserved.

Peer-to-Peer Systems and Distributed Hash Tables

Distributed Hash Tables

DHT Overview. P2P: Advanced Topics Filesystems over DHTs and P2P research. How to build applications over DHTS. What we would like to have..

CS535 Big Data Fall 2017 Colorado State University 11/7/2017 Sangmi Lee Pallickara Week 12- A.

Chapter 6 PEER-TO-PEER COMPUTING

DATA. The main challenge in P2P computing is to design and implement LOOKING UP. in P2P Systems

Page 1. How Did it Start?" Model" Main Challenge" CS162 Operating Systems and Systems Programming Lecture 24. Peer-to-Peer Networks"

Today. Why might P2P be a win? What is a Peer-to-Peer (P2P) system? Peer-to-Peer Systems and Distributed Hash Tables

Lecture 6: Overlay Networks. CS 598: Advanced Internetworking Matthew Caesar February 15, 2011

Implications of Neighbor Selection on DHT Overlays

ReCord: A Distributed Hash Table with Recursive Structure

Architectures for Distributed Systems

Chord : A Scalable Peer-to-Peer Lookup Protocol for Internet Applications

CSCI-1680 P2P Rodrigo Fonseca

MULTI-DOMAIN VoIP PEERING USING OVERLAY NETWORK

15-744: Computer Networking P2P/DHT

Dynamic Load Sharing in Peer-to-Peer Systems: When some Peers are more Equal than Others

A Structured Overlay for Non-uniform Node Identifier Distribution Based on Flexible Routing Tables

Badri Nath Rutgers University

Semester Thesis on Chord/CFS: Towards Compatibility with Firewalls and a Keyword Search

P2P Network Structured Networks: Distributed Hash Tables. Pedro García López Universitat Rovira I Virgili

*Adapted from slides provided by Stefan Götz and Klaus Wehrle (University of Tübingen)

Fault Resilience of Structured P2P Systems

Peer-to-Peer (P2P) Systems

HyCube: A distributed hash table based on a hierarchical hypercube geometry

Distributed Hash Tables: Chord

Overlay and P2P Networks. Structured Networks and DHTs. Prof. Sasu Tarkoma

Survey of DHT Evaluation Methods

Dorina Luminiţa COPACI, Constantin Alin COPACI

LECT-05, S-1 FP2P, Javed I.

Goals. EECS 122: Introduction to Computer Networks Overlay Networks and P2P Networks. Solution. Overlay Networks: Motivations.

Challenges in the Wide-area. Tapestry: Decentralized Routing and Location. Global Computation Model. Cluster-based Applications

Athens University of Economics and Business. Dept. of Informatics

Telematics Chapter 9: Peer-to-Peer Networks

08 Distributed Hash Tables

Survey on Distributed Hash Tables 1

A Method for Designing Proximity-aware Routing Algorithms for Structured Overlays

Lecture 15 October 31

Cycloid: A constant-degree and lookup-efficient P2P overlay network

12/5/16. Peer to Peer Systems. Peer-to-peer - definitions. Client-Server vs. Peer-to-peer. P2P use case file sharing. Topics

How to make sites responsive? 7/121

Challenges in the Wide-area. Tapestry: Decentralized Routing and Location. Key: Location and Routing. Driving Applications

Distributed lookup services

CS514: Intermediate Course in Computer Systems

Structured Peer-to-Peer Networks

CPSC 426/526. P2P Lookup Service. Ennan Zhai. Computer Science Department Yale University

Chapter 5 addendum Dynamic Host Configuration Protocol

Chapter 5 addendum Dynamic Host Configuration Protocol

Survive Under High Churn in Structured P2P Systems: Evaluation and Strategy

Cycloid: A Constant-Degree and Lookup-Efficient P2P Overlay Network

A Chord-Based Novel Mobile Peer-to-Peer File Sharing Protocol

Distributed hash table - Wikipedia, the free encyclopedia

Early Measurements of a Cluster-based Architecture for P2P Systems

CSCI-1680 Web Performance, Content Distribution P2P John Jannotti

CSCI-1680 Web Performance, Content Distribution P2P Rodrigo Fonseca

Overlay and P2P Networks. Structured Networks and DHTs. Prof. Sasu Tarkoma

Consistent lookup during Churn in Distributed Hash Tables

DRing: A Layered Scheme for Range Queries over DHTs

A Framework for Peer-To-Peer Lookup Services based on k-ary search

The Impact of DHT Routing Geometry on Resilience and Proximity

Distributed Systems. 17. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2016

Peer-To-Peer Techniques

Reminder: Distributed Hash Table (DHT) CS514: Intermediate Course in Operating Systems. Several flavors, each with variants.

Topics in P2P Networked Systems

PEER-TO-PEER NETWORKS, DHTS, AND CHORD

Cycloid: A Constant-Degree and Lookup-Efficient P2P Overlay Network

Introduction to Peer-to-Peer Networks

INF5071 Performance in distributed systems: Distribution Part III

EE 122: Peer-to-Peer (P2P) Networks. Ion Stoica November 27, 2002

Distributed Hash Tables Chord and Dynamo

Routing Table Construction Method Solely Based on Query Flows for Structured Overlays

Degree Optimal Deterministic Routing for P2P Systems

UC Berkeley UC Berkeley Previously Published Works

Distributed File Systems: An Overview of Peer-to-Peer Architectures. Distributed File Systems

Distributed Data Management. Profr. Dr. Wolf-Tilo Balke Institut für Informationssysteme Technische Universität Braunschweig

Making Gnutella-like P2P Systems Scalable

6 Structured P2P Networks

Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications

FPN: A Distributed Hash Table for Commercial Applications

Page 1. Key Value Storage"

P2P Overlay Networks of Constant Degree

Handling Churn in a DHT

Transcription:

P2P: Distributed Hash Tables Chord + Routing Geometries Nirvan Tyagi CS 6410 Fall16

Peer-to-peer (P2P)

Peer-to-peer (P2P) Decentralized! Hard to coordinate with peers joining and leaving

Peer-to-peer (P2P) Napster (1999)

Peer-to-peer (P2P) Napster (1999)

Peer-to-peer (P2P) Napster (1999) Problem - Centralized index server

Peer-to-peer (P2P) Napster (1999) Problem - Centralized index server Solution - Distributed hash table

Distributed Hash Tables (DHT) Hash table k 0 v 0 k 1 v 1 k 2 v 2 k 3 v 3 k 4 v 4 k 5 v 5

Distributed Hash Tables (DHT) Hash table k 0 v 0 k 1 v 1 k 2 v 2 k 0 v 0 k 1 v 1 k 3 v 3 k 4 v 4 k 4 v 4 k 5 v 5 k 5 v 5 k 2 v 2 k 3 v 3

Distributed Hash Tables (DHT) Desirable Properties Decentralization Load-balancing Scalability k 0 v 0 k 1 v 1 Availability k 4 v 4 k 5 v 5 k 2 v 2 k 3 v 3

Outline Chord Specific DHT protocol for P2P systems Simple, efficient DHT Routing Geometry Effect of different DHT protocols on desirable system properties

Chord A scalable P2P lookup service for internet applications Ion Stoica, Robert Morris, David Karger Frans Kaashoek, Hari Balakrishnan

Chord - Overview How to assign keys to peers? Hash table k 0 v 0 k 1 v 1 k 2 v 2 k 0 v 0 k 1 v 1 k 3 v 3 k 4 v 4 k 4 v 4 k 5 v 5 k 5 v 5 k 2 v 2 k 3 v 3

Chord - Overview Hash table k 0 v 0 k 1 v 1 k 2 v 2 k 3 v 3 k 4 v 4 k 5 v 5

Chord - Overview k 5 k 4 Hash table k 0 v 0 k 1 v 1 k 0 k 2 v 2 k 3 v 3 k 1 k 4 v 4 k 3 k 5 v 5 k 2

Chord - Overview k 5 k 0 v 0 k 4 Hash table k 0 v 0 k 1 v 1 k 4 v 4 k 5 v 5 k 1 v 1 k 0 k 2 v 2 k 3 v 3 k 1 k 4 v 4 k 3 k 5 v 5 k 2 v 2 k 3 v 3 k 2

Chord - Overview Identifier ring over hash space 2 m 2 m -1 0 1 2 m-1

Chord - Overview Identifier ring over hash 2 m -1 0 1 = node = key space 2 m node id = hash( node ) key id = hash( key ) 2 m-1

Chord - Overview Identifier ring over hash 2 m -1 0 1 = node = key space 2 m node id = hash( node ) key id = hash( key ) successor(id) finger table for node at id i 2 m-1 finger node id 1 succ(i) 2 succ(i + 2) j succ(i + 2 j - 1 )

Chord - Overview Identifier ring 0 = node = key 12 4 8

Chord - Overview Identifier ring 0 = node = key 12 4 8

Chord - Overview Identifier ring 0 = node = key 12 4 finger node id 1 succ(i) 2 succ(i + 2) 3 succ(i + 2 2 ) 4 succ(i + 2 3 ) 8

Chord - Overview Identifier ring 0 = node = key 12 4 finger node id 1 succ(4) 2 succ(4 + 2) 3 succ(4 + 2 2 ) 4 succ(4 + 2 3 ) 8

Chord - Overview Identifier ring 0 = node = key 12 4 finger node id 1 5 2 8 3 8 4 1 8

Chord - Lookup Identifier ring 0 find_successor(id): p = find_predecessor(id) return p.successor find_predecessor(id): n = self while id not between (n, n.successor]: n = n.closest_preceding_finger(id) return n 12 4 finger node id 1 5 2 8 3 8 4 1 finger node id 1 11 2 11 3 1 4 1 8

Chord - Lookup Identifier ring 0 find_successor(id): p = find_predecessor(id) return p.successor find_predecessor(id): n = self while id not between (n, n.successor]: n = n.closest_preceding_finger(id) return n 12 4 finger node id 1 5 2 8 3 8 4 1 lookup(10) finger node id 1 11 2 11 3 1 4 1 8

Chord - Lookup Identifier ring 0 find_successor(id): p = find_predecessor(id) return p.successor find_predecessor(id): n = self while id not between (n, n.successor]: n = n.closest_preceding_finger(id) return n 12 4 finger node id 1 5 2 8 3 8 4 1 lookup(10) follow finger 3 to node id 8 finger node id 1 11 2 11 3 1 4 1 8

Chord - Lookup Identifier ring 0 find_successor(id): p = find_predecessor(id) return p.successor find_predecessor(id): n = self while id not between (n, n.successor]: n = n.closest_preceding_finger(id) return n 12 4 finger node id 1 5 2 8 3 8 4 1 lookup(10) follow finger 3 to node id 8 node id 8 identifies as predecessor of id 10 finger node id 1 11 2 11 3 1 4 1 8

Chord - Lookup Identifier ring 0 find_successor(id): p = find_predecessor(id) return p.successor find_predecessor(id): n = self while id not between (n, n.successor]: n = n.closest_preceding_finger(id) return n 12 4 finger node id 1 5 2 8 3 8 4 1 finger node id 1 11 2 11 3 1 4 1 8 lookup(10) follow finger 3 to node id 8 node id 8 identifies as predecessor of id 10 complete lookup at successor of node id 8

Chord - Lookup Identifier ring 0 find_successor(id): p = find_predecessor(id) return p.successor find_predecessor(id): n = self while id not between (n, n.successor]: n = n.closest_preceding_finger(id) return n 12 4 finger node id 1 5 2 8 3 8 4 1 Hops? Each finger lookup halves distance to key O(log N) finger node id 1 11 2 11 3 1 4 1 8 lookup(10) follow finger 3 to node id 8 node id 8 identifies as predecessor of id 10 complete lookup at successor of node id 8

Chord - Joins + Stabilization Identifier ring 0 join(): self.predecessor = null self.successor = find_successor(self) stabilize(): p = self.successor.predecessor if p between (self, self.successor): self.successor = p self.successor.notify(self) 12 4 notify(n): if self.predecessor == null n between (self.predecessor, self): self.predecessor = n 8

Chord - Joins + Stabilization Identifier ring 0 join(): self.predecessor = null self.successor = find_successor(self) stabilize(): p = self.successor.predecessor if p between (self, self.successor): self.successor = p self.successor.notify(self) 12 4 predecessor = 4 successor = 8 notify(n): if self.predecessor == null n between (self.predecessor, self): self.predecessor = n predecessor = 5 successor = 11 8

Chord - Joins + Stabilization Identifier ring 0 join(): self.predecessor = null self.successor = find_successor(self) stabilize(): p = self.successor.predecessor if p between (self, self.successor): self.successor = p self.successor.notify(self) 12 4 predecessor = 4 successor = 8 notify(n): if self.predecessor == null n between (self.predecessor, self): self.predecessor = n join(), self = 6 predecessor = 5 successor = 11 8 predecessor = null successor = 8

Chord - Joins + Stabilization Identifier ring 0 join(): self.predecessor = null self.successor = find_successor(self) stabilize(): p = self.successor.predecessor if p between (self, self.successor): self.successor = p self.successor.notify(self) 12 4 predecessor = 4 successor = 8 notify(n): if self.predecessor == null n between (self.predecessor, self): self.predecessor = n stabilize() predecessor = 5 6 successor = 11 8 predecessor = null successor = 8

Chord - Joins + Stabilization Identifier ring 0 join(): self.predecessor = null self.successor = find_successor(self) stabilize(): p = self.successor.predecessor if p between (self, self.successor): self.successor = p self.successor.notify(self) 12 4 predecessor = 4 successor = 8 6 stabilize() notify(n): if self.predecessor == null n between (self.predecessor, self): self.predecessor = n predecessor = 5 6 successor = 11 8 predecessor = null 5 successor = 8

Chord - Joins + Stabilization Identifier ring 0 join(): self.predecessor = null self.successor = find_successor(self) stabilize(): p = self.successor.predecessor if p between (self, self.successor): self.successor = p self.successor.notify(self) 12 4 notify(n): if self.predecessor == null n between (self.predecessor, self): self.predecessor = n predecessor = 4 successor = 6 predecessor = 6 successor = 11 8 predecessor = 5 successor = 8 Outcomes of incomplete stabilization: 1. Lookup unaffected 2. Fingers out-dated, successors correct -> lookup slow but correct 3. Successors in lookup region still stabilizing -> lookup fails

Chord - Failure + Replication 0 Identifier ring Maintain list of k successors Keys replicated on all k successors 12 4 predecessor = [4, 1] successor = [6, 8] predecessor = [6, 5] successor = [11, 1] 8 predecessor = [5, 4] successor = [8, 11]

Load balance Failure resilience Lookup path length Lookup latency

Load balance Failure resilience Lookup path length Lookup latency

Load balance Failure resilience Lookup path length Lookup latency

Load balance Failure resilience Thoughts on Chord performance? Lookup path length Lookup latency

Load balance Failure resilience Lookup path length Lookup latency

Load balance Improvements to Chord routing and failure resilience in future works Pastry + Bamboo Failure resilience Lookup path length Lookup latency

The Impact of DHT Routing Geometry on Resilience and Proximity K. Gummadi, R. Gummadi, S. Gribble S. Ratnasamy, S. Shenker, I. Stoica

DHT Routing Geometries Ring (Chord) Tree (Tapestry, PRR) Hypercube (CAN) Butterfly (Viceroy) XOR (Kademlia) Hybrid (Pastry, Bamboo)

Proximity + Resilience Proximity - Pick routes through physically nearby peers, reducing latency Resilience - Continue to route requests despite network churn and failure

Proximity + Resilience Proximity - Pick routes through physically nearby peers, reducing latency Resilience - Continue to route requests despite network churn and failure Flexibility Neighbor selection - options in selecting which peers to keep in routing table Route selection - options in selecting where to route to given a destination

Proximity + Resilience Proximity - Pick routes through physically nearby peers, reducing latency Resilience - Continue to route requests despite network churn and failure Flexibility Neighbor selection - options in selecting which peers to keep in routing table Route selection - options in selecting where to route to given a destination Flexibility in neighbor selection -> good proximity Flexibility in route selection -> good resilience

DHT Routing Geometries Ring (Chord) Tree (Tapestry, PRR) Hypercube (CAN) Butterfly (Viceroy) XOR (Kademlia) Hybrid (Pastry, Bamboo)

DHT Routing Geometries - Tree XXX 0XX 00X 000 001 010 011 100 101 110 111

DHT Routing Geometries - Tree XXX Neighbor selection - one neighbor for each prefix in opposite subtree 0XX 00X 000 001 010 011 100 101 110 111

DHT Routing Geometries - Tree XXX Neighbor selection - one neighbor for each prefix in opposite subtree 0XX 00X 000 001 010 011 100 101 110 111

DHT Routing Geometries - Tree XXX Neighbor selection - one neighbor for each prefix in opposite subtree 0XX Route selection - route to neighbor in subtree of destination 00X 000 001 010 011 100 101 110 111

DHT Routing Geometries - Tree XXX Neighbor selection - one neighbor for each prefix in opposite subtree 0XX Route selection - route to neighbor in subtree of destination 00X 000 001 010 011 100 101 110 111

DHT Routing Geometries - Tree XXX Neighbor selection - one neighbor for each prefix in opposite subtree 0XX Route selection - route to neighbor in subtree of destination 00X Good flexibility in neighbor selection Poor flexibility in route selection 000 001 010 011 100 101 110 111

DHT Routing Geometries - Hypercube 110 111 100 101 010 011 000 001

DHT Routing Geometries - Hypercube 110 111 Neighbor selection - neighbor differs in the bit of one dimension 100 101 010 011 000 001

DHT Routing Geometries - Hypercube 110 111 Neighbor selection - neighbor differs in the bit of one dimension 100 101 010 011 000 001

DHT Routing Geometries - Hypercube 110 111 Neighbor selection - neighbor differs in the bit of one dimension 100 101 Route selection - route to destination by correcting any differing bit 010 011 000 001

DHT Routing Geometries - Hypercube 110 111 Neighbor selection - neighbor differs in the bit of one dimension 100 101 Route selection - route to destination by correcting any differing bit 010 011 000 001

DHT Routing Geometries - Hypercube 110 111 Neighbor selection - neighbor differs in the bit of one dimension 100 101 Route selection - route to destination by correcting any differing bit Poor flexibility in neighbor selection 010 011 Good flexibility in route selection 000 001

DHT Routing Geometries - Ring 000 111 001 110 010 101 011 100

DHT Routing Geometries - Ring 111 000 001 Neighbor selection - one neighbor in each finger interval 110 010 101 011 100

DHT Routing Geometries - Ring 111 000 001 Neighbor selection - one neighbor in each finger interval 110 010 101 011 100

DHT Routing Geometries - Ring 111 000 001 Neighbor selection - one neighbor in each finger interval Route selection - route to destination by making progress along ring 110 010 101 011 100

DHT Routing Geometries - Ring 111 000 001 Neighbor selection - one neighbor in each finger interval Route selection - route to destination by making progress along ring 110 010 101 011 100

DHT Routing Geometries - Ring 111 000 001 Neighbor selection - one neighbor in each finger interval Route selection - route to destination by making progress along ring 110 010 101 011 Good flexibility in neighbor selection Good flexibility in route selection 100

DHT Routing Geometries - Summary Neighbor selection (Proximity) Tree Hypercube Ring Route selection (Resilience)