Fabian Kuhn, Microsoft Research, Silicon Valley

Slides:



Advertisements
Similar presentations
CAN 1.Distributed Hash Tables a)DHT recap b)Uses c)Example – CAN.
Advertisements

Scalable and Dynamic Quorum Systems Moni Naor & Udi Wieder The Weizmann Institute of Science.
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
Peer-to-Peer Systems Chapter 25. What is Peer-to-Peer (P2P)? Napster? Gnutella? Most people think of P2P as music sharing.
Kademlia: A Peer-to-peer Information System Based on the XOR Metric Petar Mayamounkov David Mazières A few slides are taken from the authors’ original.
The Connectivity and Fault-Tolerance of the Internet Topology
Chord: A scalable peer-to- peer lookup service for Internet applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashock, Hari Balakrishnan.
A Blueprint for Constructing Peer-to-Peer Systems Robust to Dynamic Worst-Case Joins and Leaves Fabian Kuhn, Microsoft Research, Silicon Valley Stefan.
Structuring Unstructured Peer-to-Peer Networks Stefan Schmid Roger Wattenhofer Distributed Computing Group HiPC 2007 Goa, India.
A Distributed and Oblivious Heap Christian Scheideler and Stefan Schmid Dept. of Computer Science University of Paderborn.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Common approach 1. Define space: assign random ID (160-bit) to each node and key 2. Define a metric topology in this space,  that is, the space of keys.
Small-world Overlay P2P Network
Churn and Selfishness: Two Peer-to-Peer Computing Challenges Invited Talk University of California, Berkeley 380 Soda Hall March, 2006 Stefan Schmid Distributed.
Dynamic Internet Congestion with Bursts Stefan Schmid Roger Wattenhofer Distributed Computing Group, ETH Zurich 13th International Conference On High Performance.
On the Topologies Formed by Selfish Peers Thomas Moscibroda Stefan Schmid Roger Wattenhofer IPTPS 2006 Santa Barbara, California, USA.
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Taming Dynamic and Selfish Peers “Peer-to-Peer Systems and Applications” Dagstuhl Seminar March 26th-29th, 2006 Stefan Schmid Distributed Computing Group.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
Distributed Computing Group A Self-Repairing Peer-to-Peer System Resilient to Dynamic Adversarial Churn Fabian Kuhn Stefan Schmid Roger Wattenhofer IPTPS.
Dynamic Hypercube Topology Stefan Schmid URAW 2005 Upper Rhine Algorithms Workshop University of Tübingen, Germany.
Building Low-Diameter P2P Networks Eli Upfal Department of Computer Science Brown University Joint work with Gopal Pandurangan and Prabhakar Raghavan.
ETH Zurich – Distributed Computing Group Jasmin Smula 1ETH Zurich – Distributed Computing – Stephan Holzer Yvonne Anne Pignolet Jasmin.
Distributed Lookup Systems
A TCP With Guaranteed Performance in Networks with Dynamic Congestion and Random Wireless Losses Stefan Schmid, ETH Zurich Roger Wattenhofer, ETH Zurich.
Aggregating Information in Peer-to-Peer Systems for Improved Join and Leave Distributed Computing Group Keno Albrecht Ruedi Arnold Michael Gähwiler Roger.
Distributed Token Circulation in Mobile Ad Hoc Networks Navneet Malpani, Intel Corp. Nitin Vaidya, Univ. Illinois Urbana-Champaign Jennifer Welch, Texas.
Algorithmic Models for Sensor Networks Stefan Schmid and Roger Wattenhofer WPDRTS, Island of Rhodes, Greece, 2006.
Localized Self- healing using Expanders Gopal Pandurangan Nanyang Technological University, Singapore Amitabh Trehan Technion - Israel Institute of Technology,
Analysis of Algorithms COMP171 Fall Analysis of Algorithms / Slide 2 Introduction * What is Algorithm? n a clearly specified set of simple instructions.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Correctness of Gossip-Based Membership under Message Loss Maxim Gurevich, Idit Keidar Technion.
Other Structured P2P Systems CAN, BATON Lecture 4 1.
Models and Techniques for Communication in Dynamic Networks Christian Scheideler Dept. of Computer Science Johns Hopkins University.
Thesis Proposal Data Consistency in DHTs. Background Peer-to-peer systems have become increasingly popular Lots of P2P applications around us –File sharing,
Selected topics in distributed computing Shmuel Zaks
Using the Small-World Model to Improve Freenet Performance Hui Zhang Ashish Goel Ramesh Govindan USC.
Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa.
CCAN: Cache-based CAN Using the Small World Model Shanghai Jiaotong University Internet Computing R&D Center.
Replication Strategies in Unstructured Peer-to-Peer Networks Edith CohenScott Shenker Some slides are taken from the authors’ original presentation.
CS 5204 (FALL 2005)1 Leases: An Efficient Fault Tolerant Mechanism for Distributed File Cache Consistency Gray and Cheriton By Farid Merchant Date: 9/21/05.
Content Addressable Network CAN. The CAN is essentially a distributed Internet-scale hash table that maps file names to their location in the network.
A Mechanized Model for CAN Protocols Context and objectives Our mechanized model Results Conclusions and Future Works Francesco Bongiovanni and Ludovic.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Chord Advanced issues. Analysis Theorem. Search takes O (log N) time (Note that in general, 2 m may be much larger than N) Proof. After log N forwarding.
The Cost of Fault Tolerance in Multi-Party Communication Complexity Binbin Chen Advanced Digital Sciences Center Haifeng Yu National University of Singapore.
Chord Advanced issues. Analysis Search takes O(log(N)) time –Proof 1 (intuition): At each step, distance between query and peer hosting the object reduces.
Plethora: Infrastructure and System Design. Introduction Peer-to-Peer (P2P) networks: –Self-organizing distributed systems –Nodes receive and provide.
Aug 22, 2002Sigcomm 2002 Replication Strategies in Unstructured Peer-to-Peer Networks Edith Cohen AT&T Labs-research Scott Shenker ICIR.
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
CS 347Notes081 CS 347: Parallel and Distributed Data Management Notes 08: P2P Systems.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
Design of Tree Algorithm Objectives –Learning about satisfying safety and liveness of a distributed program –Apply the method of utilizing invariants and.
Computer Science 425/ECE 428/CSE 424 Distributed Systems (Fall 2009) Lecture 20 Self-Stabilization Reading: Chapter from Prof. Gosh’s book Klara Nahrstedt.
1 Chapter 8-1: Lower Bound of Comparison Sorts. 2 About this lecture Lower bound of any comparison sorting algorithm – applies to insertion sort, selection.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Peer-to-peer Systems All slides © IG.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
Chapter 8 Fault Tolerance. Outline Introductions –Concepts –Failure models –Redundancy Process resilience –Groups and failure masking –Distributed agreement.
Data Center Network Architectures
Monitoring Churn in Wireless Networks
Plethora: Infrastructure and System Design
SKIP GRAPHS James Aspnes Gauri Shah SODA 2003.
Chord Advanced issues.
Chord Advanced issues.
Chord Advanced issues.
Corona Robust Low Atomicity Peer-To-Peer Systems
Kademlia: A Peer-to-peer Information System Based on the XOR Metric
Presentation transcript:

A Self-repairing Peer-to-Peer Systems Resilient to Dynamic Adversarial Churn Fabian Kuhn, Microsoft Research, Silicon Valley Stefan Schmid, ETH Zurich Roger Wattenhofer, ETH Zurich Some slides taken from Stefan Schmid’s presentation of his Masters thesis

Churn Unlike servers, peers are transient! join leave Machines are under the control of individual users e.g., just connecting to download one file Membership changes are called churn join leave In peer-to-peer systems, each machine acts as both client _and_ server at the same time. However, unlike real servers, the machines often only connect to the network for short periods of time, for example to download a Successful P2P systems have to cope with churn (i.e., guarantee correctness, efficiency, etc.)!

Churn characteristics Depends on application (Skype vs. eMule vs. …) But: there may be dozens of membership changes per second! Peers may crash without notice! How can peers collaborate in spite of churn? Of course, not every P2P system has the same amount of churn. For example, a recent study shows that many users leave their Internet-telephony application (Skype) running for long time periods. On the other hand, one can imagine that in file-sharing system such as emule, there is _more_ churn, as users only connect to download one or two files and then disconnect, for example because of legacy concerns. So how can we perform reasonable tasks in spite of the churn?

Churn threatens the advantages of P2P a lot of churn So, this is an example to motivate why we really have to cope with churn in a proactive fashion. Assume that the machines are arranged in a hypercubic topology. This topology is highly scalable as each peer has a logarithmic degree, and the network diameter is also logarithmic which allows for fast lookups. If now many peers join at this peer <zeigen>, and all other peers crash, a topology arises which is very undesirable: <zeigen> One peer is connected to all other ones and becomes a bottleneck. What can we guarantee in presence of churn? We have to actively maintain P2P systems!

Goal of the paper Only a small number of P2P systems have been analyzed under churn! This paper presents techniques to: - Provably maintain P2P systems with desirable properties… - in spite of ongoing worst-case membership changes. Peer degree, network diameter, … Adversary continuously attacks the weakest part (The system is never fully repaired, but always fully functional)

How does Churn affect P2P systems? Objects may be lost when the host crashes Queries may not make it to the destination

Think about this What is the big deal about churn? Does not every P2P system define Join and Leave protocols? Well, the system eventually recovers, but during recovery, services may be affected. And objects not replicated are lost. Observe the difference between non-masking and masking fault tolerance. What we need is some form of masking tolerance.

Model for Dynamics We assume worst-case perspective: Adversary A(J,L) induces J joins and L leaves every round anywhere in the system. We assume a synchronous model: time divided into rounds. Further refinement: Adversary A(J, L, r) implies J joins, L leaves every r rounds The topology is assumed to be a hypercube that has O(log n) degree and O(log n) diameter.

Topology Maintenance π1 π2 Challenges in maintaining the hypercube! How does peer 1 know that it should replace peer 2? How does it get there when there are concurrent joins and leaves? …

Simple idea: Simulate the topology! The Proposed Approach Simple idea: Simulate the topology! So the solution we propose is to use _several_ peers per node rather than just one. That is, we propose to take a classic topology, and then simulate each vertex with _many_ peers. We can show that with this trick, the resulting structure has again the desirable properties as the original graph (small diameter, small degree), but _now it can also be maintained_! Several peers per node

General Recipe for Robust Topologies Take a graph with desirable properties Low diameter, low peer degree, etc. Replace vertices by a set of peers 3. Maintain it: a. Permanently run a peer distribution algorithm which ensures that all vertices have roughly the same amount of peers (“token distribution algorithm”). b. Estimate the total number of peers in the system and change “dimension of topology” accordingly (“information aggregation algorithm” and “scaling algorithm”). So our approach is as follows. First, we take a graph which features desirable properties. We then replace each node of this graph by a _set_ of peers. In order to maintain the network, we use _two algorithms_: <Click> The first algorithm makes sure that each node has always roughly the same number of peers, _regardless_ of the worst-case churn. In particular, each node has always at least one peer, but also not _too many_ in order to bound the _peer degree_. We call this the „peer distribution algorithm“ or „token distribution algorithm“. A second algorithm is used to change the dimesion of the topology with respect to the number of peers in the system. E.g., when many peers leave, we reduce the number of nodes of the original graph. This is called the „information aggregation algorithm“, as it estimates the total number of peers in the system. With these techniques, we get a network which has the same nice quality or _properties_ of the original graph (diameter, degree, etc.), but which is also maintainable under churn. <Click> Resulting structure has similar properties as original graph (e.g., connectivity, degree, …), but is also maintainable under churn! There is always at least one peer per node (but not too many either).

Dynamic Token Distribution V= 11011 a peers b peers W= 10010 After one step of recovery, both U and V will contain (a+b) /2 peers. Try this once for each dimension of the hypercube (dimension exchange method)

Theorem Discrepancy  is the maximum difference between the token count of a pair of nodes. The goal is to reduce the discrepancy  to 0. The previous step reduces  to 0 for fractional tokens, but for a d-dimensional hypercube, using integer tokens,  = d in the worst case In presence of an A(J,K,1) adversary, the proposed algorithm maintains the invariance of  ≤ 2J + 2K + d

Information aggregation When the total number of peers N exceeds an upper bound, each node splits into two, and the dimension of the hypercube has to increase by 1. Similarly, when the total number of peers N falls below a lower bound, pairs of nodes in dimension (d-1) merge into one, and the dimension of the hypercube has to decrease by 1. Thus, the system needs a mechanism to keep track of N.

Simulated hypercube Given an adversary A (d+1, d+1, 6)*, the outdegree of every peer is bounded by  (log2N), and The diameter is bounded by  (log N) * The adversary inserts and deletes at most (d+1) peers during any time interval of 6 rounds

Topology Only the core peers store data items. Core Despite churn, at least one node in each core has to survive Core periphery Example topology for d=2. Peers in each core are connected to one another and to the peers of the core of the neighboring nodes Q. What does the periphery node do?

6-round maintenance algorithm The authors implied six rounds for one dimension in each phase Round 1. Each node takes snapshot of active peers within itself. Round 2. Exchange snapshot Round 3. Preparation for peer migration Round 4. Core send ids of new peers to periphery. Reduce dimension if necessary. Round 5. Dimension growth & building new core (2d+3) Round 6. Exchange information about the new core.

Further improvement: Pancake Graph (1) A robust system with degree and diameter O(log n / loglog n): the pancake graph (most papers refer to Papadimitriou & Gates’ contribution here)! Pancake of dimension d: d! nodes represented by unique permutation {l1, …, ld} where l1  {1,…,d} Two nodes u and v are adjacent iff u is a prefix-inversion of v 4-dimensional pancake: 1234 4321 3214 2134 So how is this pancake graph defined? A pancake graph of dimension d consist of d factorial many nodes. Each node is a permutation of the numbers 1 to d. Two nodes u and v are _adjacent_ if their label is related by _prefix inversion_.

No other graph can have a smaller degree and a smaller diameter! The Pancake Graph (2) Properties Node degree O(log n / log log n) Diameter O(log n / log log n) … where n is the total number of nodes A factor log log n better than hypercube! But: difficult graph (diameter unknown!) No other graph can have a smaller degree and a smaller diameter! The pancake graph has very nice properties. Concretely, each node has degree log/loglog in the total number of vertices, and also log/loglog diameter. So both properties are a factor of loglog n better than in a hypercube. Moreover, one can show that there is no other graph which has smaller diameter and degree! However, the pancake graph is a _difficult graph_. Besides its nice properties, this was also a _reason_ why we chose it. For example, it is still an unsolved problem to compute its diameter! [Bem: But there are still fast routing algorithms which can be shown to be near optimal!]

Asymptotically optimal! Contributions Using peer distribution and information aggregation algorithms on the simulated pancake topology, he proposed: a DHT-based peer-to-peer system with Peer degree and lookup / network diameter in O (log n / loglog n) Robustness to ADV(O (log n / log log n), O (log n / log log n)) No data is ever lost! Asymptotically optimal! When we apply our techniques to the pancake graph, we get a peer-to-peer system where every peer can reach every other peer in log/loglog many rounds, and each peer has also at most log/loglog many neighbors! The topology is also robust to an adversary who can add and remove log/loglog peers per (communication) round. Note that this is asymptotically optimal: If more than log/loglog peers could be removed per time interval, a peer can always be isolated when the graph has only log/loglog many neighbors. Finally, if we apply the standard distributed hash table approach and store data _redundantly_ at a node, we can guarantee that no data is lost in spite of the dynamics.

The Pancake System So here is a concrete example to give you an idea of the maintanence algorithms. Assume some peers join at this node and some peers leave at this node <zeigen, Clicks>. Then, in order to maintain the invariance that each node has at least one peer, we apply our peer distribution algorithm. Concretely, we move the additional peers to the sparse areas. <Click> Of course, only to _distribute_ the peers among nodes is _not enough_. If _many_ peers leave the system <Click>, some nodes necessarily run out of peers. Therefore, our solution is to _reduce the dimension_ of the pancake if the total number of peers falls beyond a certain threshold.

Conclusion A nice model for understanding the effect of churn and dealing with it. But it is too simplistic So in conclusion, with our algorithms, it is possible to maintain the quality (e.g, routing efficiency) of P2P systems in spite of worst-case membership changes. All you need is a base graph which you can simulate, a token distribution and an information aggregation algorithm on that topology. By simulating the base graph with many peers, it is often possible to adopt its properties. As we have seen for the pancake graph, this requires some additional tricks somehow, such as building a grid inside a node rather than connect the peers in the same node completely. Moreover, of course, in graphs where the diameter is much larger than the degree, simulation is more difficult and may entail a larger degree because of the discrepancies of the token distribution algorithm. With our techniques, we could create a robust peer-to-peer system which has both smaller degree and diameter than the often-used hypercube. However, the pancake system is also much more difficult! The larger expansion is challenging during the dimension changes. This was also a reason for choosing this graph! We believe that the dynamics of P2P system is still an interesting and important research area, as many systems today only apply _heuristics_, or are (in theory) only analysed for static environments. In particular, our approach is only a first step. For example, our system fails if an adversary can remove _more peers_ once in a while. That is, there is no _self-stabilizing_ mechanism.