SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Chord: A scalable peer-to-peer lookup service for
internet applications
Tom Faulhaber

tom@infolace.com

Papers We Love SF

August 2016
Chord is a completely peer-to-peer distributed key management
system that works under dynamic membership churn.
Context
Idea 1: Consistent Hashing
Consistent Hashing
• Map keys to a hash m-bits
long, e.g. SHA-1.

• Construct a ring with
operations performed mod 2m
Consistent Hashing
• Map keys to a hash m-bits
long, e.g. SHA-1.

• Construct a ring with
operations performed

• For example, take 

• Gives us separate
addresses.
m = 3
23
= 8
mod 2m
Nodes and Keys
• Each node in the network has
an address, typically

• We define , the
successor of , defined as

• Key is stored at node 

• Each node knows



• gives lookup
performance, where is the
number of nodes
addr = hash(ip)
succ(k)
min(n) | n k mod 2m
succ(k) O(N)
N
k succ(k)
k
n
n0
= succ(n + 1 mod 2m
)
Idea 2: Finger Tables
Finger tables
• To move from to
Chord uses a “finger table” to
track nodes around the ring.

• Fundamental insight

- dense information nearby, 

- sparse information far away

• Table defined by:

• Also track
O(n) O(log n)
finger[k].start = (n + 2k 1
) mod 2m
, 1  k  m
.interval = [finger[k].start, finger[k + 1].start)
.node = succ(finger[k].start)
successor = finger[1].node
predecessor
Example Layout
m = 6
2m
= 64
Node Location
α 7
β 16
γ 42
δ 44
ε 50
ζ 52
η 3
θ 4
This table does not exist!
The View from α
k start end n
1 8 8 β
2 9 10 β
3 11 14 β
4 15 22 β
5 23 38 γ
6 39 7 γ
Starting from α, retrieve key 51

First step, ask γ
The View from γ
k start end n
1 43 43 δ
2 44 45 δ
3 46 49 ε
4 50 57 ε
5 58 9 η
6 10 42 β
Second step, ask ε
The View from ε
k start end n
1 51 51 ζ
2 52 53 ζ
3 54 57 η
4 58 1 η
5 2 17 η
6 18 50 γ
Third step, ask ζ
At this point, so ζ
will have the key
succ(51) = ⇣
Idea 3: Handling Churn
Joining the network
Once a node has assigned itself
an id, , it does 3 things:

1. Builds its finger table and
predecessor
n0
k start n
1
2
3
4
5
… … …
n0
+ 1 succ(n0
+ 1)
n0
+ 2
n0
+ 4
n0
+ 8
n0
+ 16 succ(n0
+ 16)
succ(n0
+ 2)
succ(n0
+ 4)
succ(n0
+ 8)
Joining the network
Once a node has assigned itself
an id, , it does 3 things:

1. Builds its finger table and
predecessor

2. Updates other nodes that
should have their finger tables
point to

3. Notify upper layers of
software that they need to
move keys.
n0
n0
Joining the network
Once a node has assigned itself
an id, , it does 3 things:

1. Builds its finger table and
predecessor

2. Updates other nodes that
should have their finger tables
point to

3. Notify upper layers of
software that they need to
move keys.
n0
n0
Joins take messages

keys will be moved
O(log2
n)
O(
1
N
)
Concurrency & Failure
Two basic mechanisms:

1. Every node periodically performs stabilization

2. Each node maintains a successor list rather than a single successor

When a node fails, it’s keys are lost. Other mechanisms are used by higher
levels to build resiliency, e.g. republishing or replication.
Related Work
Related Work
• Pastry

• CAN

• Kademlia

• Tapestry
Impact
Impact
• Research applications in domains such as distributed file systems, pub-sub,
document sharing, search algorithms.

• Basis for sharing data to nodes in systems like Cassandra without requiring a
global index.
The End!

Weitere ähnliche Inhalte

Was ist angesagt?

Easy how to work subnet etc
Easy how to work subnet etcEasy how to work subnet etc
Easy how to work subnet etc
Tanya Lo
 

Was ist angesagt? (20)

Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)
 
AES Cryptosystem
AES CryptosystemAES Cryptosystem
AES Cryptosystem
 
Quantum Cryptography
Quantum CryptographyQuantum Cryptography
Quantum Cryptography
 
Cryptographic algorithms
Cryptographic algorithmsCryptographic algorithms
Cryptographic algorithms
 
Easy how to work subnet etc
Easy how to work subnet etcEasy how to work subnet etc
Easy how to work subnet etc
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
 
Secure Hash Algorithm
Secure Hash AlgorithmSecure Hash Algorithm
Secure Hash Algorithm
 
AES effecitve software implementation
AES effecitve software implementationAES effecitve software implementation
AES effecitve software implementation
 
Class3
Class3Class3
Class3
 
An Algorithm for Keyword Search on an Execution Path
An Algorithm for Keyword Search on an Execution PathAn Algorithm for Keyword Search on an Execution Path
An Algorithm for Keyword Search on an Execution Path
 
Password Cracking with Rainbow Tables
Password Cracking with Rainbow TablesPassword Cracking with Rainbow Tables
Password Cracking with Rainbow Tables
 
SHA 1 Algorithm
SHA 1 AlgorithmSHA 1 Algorithm
SHA 1 Algorithm
 
AES by example
AES by exampleAES by example
AES by example
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
 
Solr sparse faceting
Solr sparse facetingSolr sparse faceting
Solr sparse faceting
 
Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || Algorithms
 
Private and secure secret shared map reduce
Private and secure secret shared map reducePrivate and secure secret shared map reduce
Private and secure secret shared map reduce
 
Keccak
KeccakKeccak
Keccak
 
Ch12
Ch12Ch12
Ch12
 
Aes
AesAes
Aes
 

Ähnlich wie Chord Presentation at Papers We Love SF, August 2016

Intro 2 Computer Networks
Intro 2 Computer NetworksIntro 2 Computer Networks
Intro 2 Computer Networks
rakeshgoswami
 
Data Encryption standard in cryptography
Data Encryption standard in cryptographyData Encryption standard in cryptography
Data Encryption standard in cryptography
NithyasriA2
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1
asslang
 

Ähnlich wie Chord Presentation at Papers We Love SF, August 2016 (20)

Introduction to Computer Networks
Introduction to Computer NetworksIntroduction to Computer Networks
Introduction to Computer Networks
 
Intro 2 Computer Networks
Intro 2 Computer NetworksIntro 2 Computer Networks
Intro 2 Computer Networks
 
lec03-chord(1).pptx
lec03-chord(1).pptxlec03-chord(1).pptx
lec03-chord(1).pptx
 
Chord Algorithm
Chord AlgorithmChord Algorithm
Chord Algorithm
 
Data Encryption standard in cryptography
Data Encryption standard in cryptographyData Encryption standard in cryptography
Data Encryption standard in cryptography
 
15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx
15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx
15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx
 
Chord
ChordChord
Chord
 
5.1.3. Chord.pptx
5.1.3. Chord.pptx5.1.3. Chord.pptx
5.1.3. Chord.pptx
 
Blockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentationBlockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentation
 
J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6
 
Build your first blockchain
Build your first blockchainBuild your first blockchain
Build your first blockchain
 
SHA
SHASHA
SHA
 
1 DES.pdf
1 DES.pdf1 DES.pdf
1 DES.pdf
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network Security
 
Paul presentation P2P Chord v1
Paul presentation P2P Chord v1Paul presentation P2P Chord v1
Paul presentation P2P Chord v1
 
OpenStack sdn
OpenStack sdnOpenStack sdn
OpenStack sdn
 
BlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshopBlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshop
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1
 
Implementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and AkkaImplementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and Akka
 
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 

Chord Presentation at Papers We Love SF, August 2016

  • 1. Chord: A scalable peer-to-peer lookup service for internet applications Tom Faulhaber tom@infolace.com Papers We Love SF August 2016
  • 2.
  • 3. Chord is a completely peer-to-peer distributed key management system that works under dynamic membership churn.
  • 5.
  • 6.
  • 8. Consistent Hashing • Map keys to a hash m-bits long, e.g. SHA-1. • Construct a ring with operations performed mod 2m
  • 9. Consistent Hashing • Map keys to a hash m-bits long, e.g. SHA-1. • Construct a ring with operations performed • For example, take • Gives us separate addresses. m = 3 23 = 8 mod 2m
  • 10. Nodes and Keys • Each node in the network has an address, typically • We define , the successor of , defined as
 • Key is stored at node • Each node knows
 • gives lookup performance, where is the number of nodes addr = hash(ip) succ(k) min(n) | n k mod 2m succ(k) O(N) N k succ(k) k n n0 = succ(n + 1 mod 2m )
  • 11. Idea 2: Finger Tables
  • 12. Finger tables • To move from to Chord uses a “finger table” to track nodes around the ring. • Fundamental insight
 - dense information nearby, 
 - sparse information far away • Table defined by: • Also track O(n) O(log n) finger[k].start = (n + 2k 1 ) mod 2m , 1  k  m .interval = [finger[k].start, finger[k + 1].start) .node = succ(finger[k].start) successor = finger[1].node predecessor
  • 13. Example Layout m = 6 2m = 64 Node Location α 7 β 16 γ 42 δ 44 ε 50 ζ 52 η 3 θ 4 This table does not exist!
  • 14. The View from α k start end n 1 8 8 β 2 9 10 β 3 11 14 β 4 15 22 β 5 23 38 γ 6 39 7 γ Starting from α, retrieve key 51 First step, ask γ
  • 15. The View from γ k start end n 1 43 43 δ 2 44 45 δ 3 46 49 ε 4 50 57 ε 5 58 9 η 6 10 42 β Second step, ask ε
  • 16. The View from ε k start end n 1 51 51 ζ 2 52 53 ζ 3 54 57 η 4 58 1 η 5 2 17 η 6 18 50 γ Third step, ask ζ At this point, so ζ will have the key succ(51) = ⇣
  • 18. Joining the network Once a node has assigned itself an id, , it does 3 things: 1. Builds its finger table and predecessor n0 k start n 1 2 3 4 5 … … … n0 + 1 succ(n0 + 1) n0 + 2 n0 + 4 n0 + 8 n0 + 16 succ(n0 + 16) succ(n0 + 2) succ(n0 + 4) succ(n0 + 8)
  • 19. Joining the network Once a node has assigned itself an id, , it does 3 things: 1. Builds its finger table and predecessor 2. Updates other nodes that should have their finger tables point to 3. Notify upper layers of software that they need to move keys. n0 n0
  • 20. Joining the network Once a node has assigned itself an id, , it does 3 things: 1. Builds its finger table and predecessor 2. Updates other nodes that should have their finger tables point to 3. Notify upper layers of software that they need to move keys. n0 n0 Joins take messages keys will be moved O(log2 n) O( 1 N )
  • 21. Concurrency & Failure Two basic mechanisms: 1. Every node periodically performs stabilization 2. Each node maintains a successor list rather than a single successor When a node fails, it’s keys are lost. Other mechanisms are used by higher levels to build resiliency, e.g. republishing or replication.
  • 23. Related Work • Pastry • CAN • Kademlia • Tapestry
  • 25. Impact • Research applications in domains such as distributed file systems, pub-sub, document sharing, search algorithms. • Basis for sharing data to nodes in systems like Cassandra without requiring a global index.