SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
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!

Más contenido relacionado

La actualidad más candente

Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)Amir Masinaei
 
Quantum Cryptography
Quantum CryptographyQuantum Cryptography
Quantum CryptographyDayeong Kang
 
Cryptographic algorithms
Cryptographic algorithmsCryptographic algorithms
Cryptographic algorithmsAnamika Singh
 
Easy how to work subnet etc
Easy how to work subnet etcEasy how to work subnet etc
Easy how to work subnet etcTanya Lo
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
AES effecitve software implementation
AES effecitve software implementationAES effecitve software implementation
AES effecitve software implementationRoman Oliynykov
 
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 PathKamiya Toshihiro
 
Password Cracking with Rainbow Tables
Password Cracking with Rainbow TablesPassword Cracking with Rainbow Tables
Password Cracking with Rainbow TablesKorhan Bircan
 
AES by example
AES by exampleAES by example
AES by exampleShiraz316
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption StandardPrince Rachit
 
Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsShubham Sharma
 
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 reduceShantanu Sharma
 

La actualidad más candente (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
 

Similar a Chord Presentation at Papers We Love SF, August 2016

Introduction to Computer Networks
Introduction to Computer NetworksIntroduction to Computer Networks
Introduction to Computer NetworksVenkatesh Iyer
 
Intro 2 Computer Networks
Intro 2 Computer NetworksIntro 2 Computer Networks
Intro 2 Computer Networksrakeshgoswami
 
lec03-chord(1).pptx
lec03-chord(1).pptxlec03-chord(1).pptx
lec03-chord(1).pptxSangitaRoy34
 
Chord Algorithm
Chord AlgorithmChord Algorithm
Chord AlgorithmSijia Lyu
 
Data Encryption standard in cryptography
Data Encryption standard in cryptographyData Encryption standard in cryptography
Data Encryption standard in cryptographyNithyasriA2
 
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.pptxNibrasulIslam
 
5.1.3. Chord.pptx
5.1.3. Chord.pptx5.1.3. Chord.pptx
5.1.3. Chord.pptxAnusuya123
 
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 presentationPaperchain
 
J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6Jesse Burke
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network SecurityDr. Rupa Ch
 
Paul presentation P2P Chord v1
Paul presentation P2P Chord v1Paul presentation P2P Chord v1
Paul presentation P2P Chord v1Paul Yang
 
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 workshopPad Kankipati
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1asslang
 
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 AkkaTristan Penman
 
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdfSelvaraj Seerangan
 

Similar a 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
 

Último

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

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.