Kademlia: A Peer-to-peer Information System Based on the XOR Metric

Panašūs dokumentai
AB Linas Agro Group 2018 m. spalio 31 d. eilinio visuotinio akcininkų susirinkimo BENDRASIS BALSAVIMO BIULETENIS GENERAL VOTING BALLOT at Annual Gener

Vienlusčių įtaisų projektavimas

Civilinės aviacijos administracija

NEPRIKLAUSOMO AUDITORIAUS IŠVADA UAB Vilniaus gatvių apšvietimo elektros tinklai akcininkui Nuomonė Mes atlikome UAB Vilniaus gatvių apšvietimo elektr

Priedai

AB Linas Agro Group 2018 m. spalio 31 d. eilinio visuotinio akcininkų susirinkimo BENDRASIS BALSAVIMO BIULETENIS GENERAL VOTING BALLOT at Annual Gener

Programų sistemų inžinerija Saulius Ragaišis, VU MIF

Microsoft Word - Deposits and withdrawals policy 400.doc

MUITINĖS DEPARTAMENTAS PRIE LIETUVOS RESPUBLIKOS FINANSŲ MINISTERIJOS BENDRO NAUDOTOJŲ VALDYMO SISTEMOS, ATITINKANČIOS EUROPOS KOMISIJOS REIKALAVIMUS,

DARBO SUTARTIS

A-M-K_nr-11_maketas_trump.indd

SPECIALIOSIOS UŽDAROJO TIPO PRIVATAUS KAPITALO INVESTICINĖS BENDROVĖS INVL TECHNOLOGY AUDITO KOMITETO NUOSTATAI BENDROJI DALIS 1. Šie specialiosios už

Slide 1

PowerPoint Presentation

Klausimas: Could you please provide clarity to one section of the tender document? In the document it states (using a google translator) Before enteri

2019 m. LIETUVOS RESPUBLIKOS BURIAVIMO TAURĖS REGATA BEI VLADIMIRO IR VALERIJAUS MAMONTOVŲ ATMINIMO VĖTRUNGĖS TAURĖ d. NIDA, Lietuva LEN

MHAIA Estimation of Production rd Stage

MAGENTO 1.9 OMNIVA MODULIO DIEGIMO INSTRUKCIJA

Title

PR_COD_1amCom

Vertimas iš anglų kalbos Question: Could you please provide clarity to one section of the tender document? In the document it states (using a google t

A-M-K_nr-10_maketas_I.indd

VIZOS GAVIMAS-INFO

CompoundJS Node on rails

Dokumentų leidimui laikinai gyventi Lietuvos Respublikoje gauti pateikimo ir leidimų laikinai gyventi Lietuvos Respublikoje užsieniečiams išdavimo, ke

PowerPoint Presentation

Register your product and get support at Indoor wireless headphones SHC8535 SHC8575 LT Vartotojo vadovas

Slide 1

AVK SUPA PLUS COUPLING 621/61 Tensile, for PE and PVC pipes, NF approved EPDM sealing 001 AVK Supa Plus is a range of tensile couplings, flange adapto

Neiškiliojo optimizavimo algoritmas su nauju bikriteriniu potencialiųjų simpleksų išrinkimu naudojant Lipšico konstantos įvertį

STUDENTŲ, ATRINKTŲ ERASMUS+ STUDIJOMS SU STIPENDIJA, SĄRAŠAS/ LIST OF STUDENTS THAT HAVE BEEN AWARDED WITH ERASMUS+ SCHOLARSHIPS Nr. Fakultetas/ Facul

VILNIUS GEDIMINAS TECHNICAL UNIVERSITY Vytautas DUMBLIAUSKAS DEVELOPMENT AND APPLICATION OF TOUR-BASED TRAVEL DEMAND MODEL FOR PLANNING OF URBAN TRANS

PATVIRTINTA: LASF žiedo komiteto, Originali teksto kalba - lietuvių. The original text language is Lithuanian Turinys (Content) 1. TAISYKLĖSE NAUDOJAM

Microsoft Word - SDH2.doc

Slide 1

LIETUVOS AGRARINĖS EKONOMIKOS INSTITUTAS

Longse Wi-Fi kameros greito paleidimo instrukcija 1. Jums prireiks 1.1. Longse Wi-Fi kameros 1.2. Vaizdo stebėjimo kameros maitinimo šaltinio 1.3. UTP

I

Microsoft Word asis TAS.DOC

Algoritmai ir duomenų struktūros (ADS) 7 paskaita Saulius Ragaišis, VU MIF

LIETUVOS RESPUBLIKOS VALSTYBINIO PATENTŲ BIURO DIREKTORIAUS

Automatinis skolinimas Automatinio skolinimo paslauga automatiškai teikia pasiūlymus paskolų prašymams pagal Jūsų pasirinkto portfelio rinkinio nustat

Microsoft Word - AIKOS IKUP1

Microsoft Word - 15_paskaita.doc

Microsoft Word - anglu_valst_ANALIZE.doc

Algoritmai ir duomenų struktūros (ADS) 2 paskaita Saulius Ragaišis, VU MIF

Vilius Grabauskas Jūratė Klumbienė Janina Petkevičienė Edita Šakytė Vilma Kriaučionienė Aurelijus Veryga Ritva Prättälä SUAUGUSIŲ LIETUVOS ŽMONIŲ GYVE

PowerPoint Presentation

Elektroninio dokumento nuorašas CIVILINĖS AVIACIJOS ADMINISTRACIJOS DIREKTORIUS ĮSAKYMAS DĖL CIVILINĖS AVIACIJOS ADMINISTRACIJOS DIREKTORIAUS 2012 M.

Pardavimų aplikacija (Microsoft Dynamics AX (Axapta) sistemai) Diegimo instrukcija bifree.lt qlik.com

GPU

skaitiniai metodai 1

Vilius Grabauskas Jūratė Klumbienė Janina Petkevičienė Edita Šakytė Vilma Kriaučionienė Aurelijus Veryga SUAUGUSIŲ LIETUVOS ŽMONIŲ GYVENSENOS TYRIMAS,

Java esminės klasės, 1 dalis Išimtys, Įvestis/išvestis

DB sukūrimas ir užpildymas duomenimis

Programos Leader ir žemdirbių mokymo metodikos centras Centre for Leader Programme and Agricultural Training Methodology LEADER ĮGYVENDINIMO APŽVALGA

rp_ IS_2

SPECIALUSIS UGDYMAS / SPECIAL EDUCATION (37) DOI: /se.v2i EDUKACINĖS PROGRAMINĖS ĮRANGOS INTEGRUOTO TAIKYMO EFEKTYVUMO VERTINIMAS

Saziningumo_pasizadejimu_eskperimentas_8(a5)

274 PRIEDAI K priedas. Elektroninio vartotojo gyvavimo ciklo tyrimo duomenų charakteristikos K.1 lentelė. Klausimyno dalies, skirtos elektroninio vart

Socialines pazangos ataskaita LT+EN.indd

DBVS realizavimas Pagrindiniai DBVS komponentai Duomenų saugojimas diske Paruošė J.Skučas

Turinys Bendrovės vadovo žodis...2 Bendrovės valdymo struktūra...4 Bendrovės pagrindinės veiklos pobūdis...6 Bendrovės 2008 metų veiklos apžvalga...8

CIVILINĖS AVIACIJOS ADMINISTRACIJOS DIREKTORIAUS

PRESENTATION NAME

PowerPoint Presentation

Transkriptas:

Kademlia: A Peer-to-peer Information System Based on the XOR Metric Petar Maymounkov and David Mazières New York University http://kademlia.scs.cs.nyu.edu/ New York University 2 Slide of 35

Setting Key/value pairs storage and retrieval Keys are unique w.l.o.g. keys are uniformly distributed (6-bit) =) numbers (e.g. use hashing) Keys can have different store and/or retrieve popularity DHT (Distributed Hash Table) New York University 2 Slide 2 of 35

Constraints Any particular node can disappear at any time Nodes should be loaded equally (bandwidth and storage) Goal Quick storage and retrieval, independent from node failures Minimize number of control messages New York University 2 Slide 3 of 35

Ideal case Node instability Once a node joins, it never leaves. Realistic case A randomly selected online node will stay online for another hour with probability /2. New York University 2 Slide 4 of 35

.8.6.4.2 5 5 2 25 Probability of remaining online another hour as a function of uptime. x The axis represents minutes. y The axis shows the the fraction of nodes that stayed online at x least minutes that also stayed online at x + 6 least minutes. New York University 2 Slide 5 of 35

Common approach. Assign random (6-bit) ID to each node 2. Define a metric topology on the 6-bit numbers, i.e. the space of keys and node IDs 3. Each node keeps contact information to O(log n) other nodes 4. Provide a lookup algorithm, which finds the node, whose ID is closest to a given key. we need a metric that identifies closest node uniquely =) 5. Store and retrieve a key/value pair at the node whose ID is closest to the key New York University 2 Slide 6 of 35

Chord lookup Each step halves the topological distance to the target. So we have expected log n hops to the target. New York University 2 Slide 7 of 35

Chord routing table basics /6 /6 /2 /8 /4 Contacts in logarithmically distributed regions of the ID space New York University 2 Slide 8 of 35

Chord routing table rigidity /6 /6 /2 /8 /4 Rigidity Complicates recovery from failed nodes and routing table Precludes proximity-based routing New York University 2 Slide 9 of 35

Chord discrepancy /6 /6 /2 /8 /4 In- and out- distribution are exactly opposite Prevents from using incoming traffic to re-enforce routing table New York University 2 Slide of 35

Fixing Chord has drawbacks /6 /6 /6 /6 /8 /8 /4 /4 Bi-directional routing table has drawbacks Doubles routing table size Doubles number of control messages New York University 2 Slide of 35

Kademlia: a peer-to-peer system Flexible routing table Allows to benefit from proximity-based routing So relaxed, that maintenance is minimal In- and out- distributions are the same Network re-enforces itself Just log n contacts (not counting redundancy) New York University 2 Slide 2 of 35

Overarching idea Every hop brings us in a smaller subtree around the target. Can forward requests to any node in the appropriate subtree. New York University 2 Slide 3 of 35

Idea: routing table No more rigidity: can have any contact in a subtree In- and out- distributions are the same Routing table size is still log n Why do we need a topology? New York University 2 Slide 4 of 35

The XOR topology Definition: d(x; Y ) = X Φ Y Intuition: Differences at higher order bits matter much more than differences at lower order bits., distance is 4 + 32 = 36 Geometric intuition: Nodes in the same tree are much closer together than they are with nodes in other subtrees. New York University 2 Slide 5 of 35

Complete XOR tree of 5-bit numbers Points in the same subtree are much closer together than they are with points in other subtrees. New York University 2 Slide 6 of 35

Contact Data Structures A pair of node ID and IP:UDP port k-bucket A container for no more than k contacts (we use k = 2) Operations place contact and remove contact Routing table Operations place contact and remove contact A constrained tree of k-buckets Each bucket responsible for a range of the node ID space New York University 2 Slide 7 of 35

Routing Table Data Structure (for node, whose pseudo-address is...) Pseudo-Address Space...... k-buckets New York University 2 Slide 8 of 35

Routing Table Data Structure Pseudo-Address Space...... 2-buckets New York University 2 Slide 9 of 35

Simple lookup.... New York University 2 Slide 2 of 35

Goal: Find the k nodes closest to a given target T 2 f; g 6 Lookup algorithm skeleton RPC: find node n (T ) returns all contacts from the (first non-empty) k-bucket in n s routing table that is closest T to Lookup: n o = ourselves (the node that is performing the lookup) N = find node no (T ) N 2 = find node n (T ) ::: l = find node nl (T ); N this completes N when l contains no contacts that haven t been called already n i is any contact in N i New York University 2 Slide 2 of 35

How lookup works? On every step, the metric distance between n i and the target reduces by an exact factor of /2. (abstractly) every step reduces the pool of candidates by an =) expected factor of /2. Consequent calls to find node n (T ) fetch the result from ever smaller-range k-buckets. New York University 2 Slide 22 of 35

Concurrent lookup : Trade bandwidth for lower latency lookups Goals: Route through closer/faster machines Avoid delays due to timeouts on offline contacts Idea: Perform ff > calls to find node n (T ) in parallel. New York University 2 Slide 23 of 35

Asynchronous Lookup Round Round Round 2 Round 3 Round 4 8 4 4 2 9 5 7 3 6 8 4 7 9 6 2 8 7 3 9 New York University 2 Slide 24 of 35

Why lookup works? Routing table invariant The routing table always contains the k closest to ourselves nodes A k-bucket is only empty if there are no nodes in its range New York University 2 Slide 25 of 35

Contact accounting Whenever we use a contact that doesn t respond within a given timeout, we remove it from the routing table As a general rule: every node places a contact to each node that makes an RPC call to it in its routing table Due to XOR topology s symmetry, the distribution of nodes that call us is going to be the same as the distribution of contacts that we need for our routing table Formally: the probability of being contacted by someone at a 2 [2 distance ; 2 ], i+ i =, from us is a constant, independent l i of i New York University 2 Slide 26 of 35

Joining, Leaving and Refreshes Node join: Borrow some contacts from an already online node Lookup self Cost of join is O(log n) messages Node leave: no action Very useful for modem connections that may disconnect multiple times during a long online session Hourly k-bucket refreshes (only if necessary) New York University 2 Slide 27 of 35

Routing Table Evolution (for node, whose pseudo-address is...) Pseudo-Address Space...... New York University 2 Slide 28 of 35

Key-Value Pairs Invariant: Be able to find the key-value pairs on one or more of k the nodes closest to the key Publishing and searching is like a lookup New York University 2 Slide 29 of 35

Key/Value Invariant Joining nodes are immediately noticed by their closest neighbours, and the appropriate key/value pairs are replicated to them. Re-enforce invariant every hour Expected Retainment Time (of a key/value pair) is 2 k hours. New York University 2 Slide 3 of 35

Search caching Topological caching When a key starts getting popular, replicate it to more nodes around its location. When searching for a key, stop the lookup as soon as we get a result. New York University 2 Slide 3 of 35

Caching principles New York University 2 Slide 32 of 35

Overpopular nodes Nodes tend to be seen only by nearby nodes Hard-limit on requests prevents over-popularity Flip-side: Natural separation between very-long-staying nodes and short comers. New York University 2 Slide 33 of 35

Novel topology: Conclusions Symmetry: If d(x; Y ) = d(y; X). Helps reduce control messages. Uniqueness: For X 2 f; g every and l 2 there is 6 2 f; g unique, such that d(x; Y ) = l. Identify key Y location uniquely. 6 Unidirectionality: For X a fixed Y there are s for which i 2. Makes caching efficient. i 2 5 ) Y d(x; Asynchronous lookup: avoids slow links New York University 2 Slide 34 of 35

Further directions Non-unique keys. Node heterogenity (nodes of different strengths) Network heterogenity (take advantage of fast intranets) Security models against node, key and lookup attacks. New York University 2 Slide 35 of 35