Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
First step of “Chord”
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yoshiaki Yoshida
September 23, 2016
Technology
850
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
First step of “Chord”
First step of “Chord”
Yoshiaki Yoshida
September 23, 2016
More Decks by Yoshiaki Yoshida
See All by Yoshiaki Yoshida
技術ブロガーを育てる!ブログメンタリングで何を教えているのか / Passion for Blog Mentoring
kakakakakku
8
38k
プログラミング初心者に教えるときは「身近な比喩」が重要なのだ! / Metaphor is Important for Beginner Programmer
kakakakakku
2
5.8k
プロジェクトの成功を支える ZenHub と モブプログラミング / ZenHub and Mob Programming
kakakakakku
1
6k
楽しく!アウトプットを習慣化しよう / Let's Enjoy Output
kakakakakku
3
7.1k
さぁ!今すぐプロジェクトリーダーに立候補しよう / Be a Project Leader
kakakakakku
3
10k
プロジェクトをリードする技術 (Kyash 社 再演) / Project Leading is Skill for Kyash
kakakakakku
4
2.3k
プロジェクトをリードする技術 / Project Leading is Skill
kakakakakku
45
52k
Mackerel で ECS をどこまでモニタリングできるのか / Monitoring ECS with Mackerel
kakakakakku
0
14k
[2018/01/30] Redash 初心者向けハンズオン / Redash Meetup #0.1
kakakakakku
0
2.5k
Other Decks in Technology
See All in Technology
LLMやAIエージェントをソフトウェアに組み込むプラクティス
shibuiwilliam
2
410
大量データに対しても、生成AIを用いてリーズナブルにデータ加工をしたい!Databricksのai_queryについて調べてみた
kamoshika
1
210
Kaggleで成長するために意識したこと
prgckwb
2
410
End-to-Endで考える信頼性 —LINEアプリにおけるクライアント開発×SRE連携の実践
maruloop
4
4.5k
AI時代の闇と光
tatsuya1970
0
110
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
420
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.4k
Making sense of Google’s agentic dev tools
glaforge
1
260
AI Coding Agent時代のcdk-nagガードレール 〜組織ルールを強制CIで守り抜く設計の挑戦〜
mhrtech
3
390
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
420
【Claude Code】鹿野さんに聞く 私の推しの並行開発環境 大公開 / claude-code-parallel-2026-07-15
tonkotsuboy_com
12
8.5k
OPENLOGI Company Profile for engineer
hr01
1
74k
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
4 Signs Your Business is Dying
shpigford
187
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.6k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Thoughts on Productivity
jonyablonski
76
5.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
A designer walks into a library…
pauljervisheath
211
24k
Being A Developer After 40
akosma
91
590k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
Transcript
First step of “Chord” 2016-09-23 ࣾษڧձ @kakakakakku
Cloud Computing Concepts, Part 1 by
࠷ۙ Coursera Ͱ ཤमͯ͠ΔߨٛͰֶΜͩ “Chord” ΛβοΫϦͱհ͠·͢
What is “Chord” ?
None
(ƅшƅ) ŴƅŜŖƃ ?
εέʔϥϏϦςΟͷ͋Δ P2P ୳ࡧΞϧΰϦζϜʢҙ༁ʣ → ൃද2001
[Related Algorithms] Tapestry Pastry Kademlia ʘ ࠓհ͠ͳ͍͚Ͳଞʹ͋Δ ʗ
[Related Implementation] Cassandra Dynamo Riak Voldemort ʘ ϛυϧΣΞΛΠϝʔδ͢Δͱۙײ༙͘ ʗ
ʘ Dynamo ͷจ·ͨผͷػձʹհ͠·͢ ʗ
P2P Λྨ͢Δͱ...
Unstructured Overlay Structured Overlay Chord Napster / Gnutella
Goal of “Chord”
େྔͷΩʔΛͲ͏ࢄͤ͞Δ ? େྔͷΩʔΛͲ͏ޮతʹ୳ࡧͤ͞Δ ? ϊʔυͷ૿ݮʹͲ͏ରԠ͢Δ ?
“Chord” = Consistent Hashing + Finger Table
(ƅшƅ) Űō?
Consistent Hashing ղઆ
None
ҰݴͰද͢ͱ Ωʔͷ࠶ஔͷӨڹΛݮͨ͠ ޮతͳϋογϡ๏ʢҙ༁ʣ
Bad Example ʘ ࠷ॳʹμϝͳྫΛݟͯΈ·͠ΐ͏ ʗ
3 Nodes 4 Keys ΩϨΠʹ ࢄͨ͠ ??? ୯७ʹ mod ͰΩʔΛϊʔυʹஔ͢Δͱ...
͠1 ނোͨ͠߹ ΦϨϯδҎ֎ શͯͷΩʔΛ࠶ஔ ͢Δඞཁ͕͋Δ
Consistent Hashing ొ
ϊʔυͱΩʔΛϋογϡԽͯ͠ ԾϦϯά্ʹஔ͢Δ ※ԾͷҙຯࠓճׂѪ͠·͢...
֤Ωʔ͔Βݟͯ ࣌ܭճΓʹ1൪ۙͨ͠ϊʔυʹ ΩʔΛஔ͢Δͱ͍͏ߟ͑ํ ʢͦͷϊʔυ Successor ͱݺͿʣ
Ϧϯάۭؒ ஔ ஔ ஔ
Ϧϯάۭؒ ނোͰ࠶ஔ͕ඞཁͳΩʔ ʹݮ͞ΕΔ ஔ ࠶ஔ ஔ
Αͬͯ ϊʔυՃʗނোʢҙਤతͳݮগʣ ʹରͯ͠ ہॴతͳӨڹʹ͑ΒΕΔ
Finger Table ղઆ
Chord ͷಛతͳΈ ! ҰݴͰද͢ͱγϣʔτΧοτతͳ ?
Bad Example ʘ ࠷ॳʹμϝͳྫΛݟͯΈ·͠ΐ͏ ʗ
୳ࡧ͢Δͱ͖ʹ key ͕͋Δ ୳ࡧΛϦΫΤετ ͢Δϊʔυ
ϊʔυΛॱ൪ʹḷͬͯ͠·͏ͱ ઢܗ୳ࡧʹͳͬͯ͠·͏… ʘ Oh, No! ʗ
Finger Table ొ
ҙͷϊʔυʹରͯ͠ ࢦؔతʹ୳ࡧՄೳͳ ϩέʔγϣϯʢҙ༁ʣΛఆΊͯ ଟஈ֊ʹ୳ࡧͤ͞Δ
͜ͷྫͩͱ m=3 ͰޮՌ͕ແͦ͞͏ʹݟ͑Δ͚Ͳ... Finger Table
ઢܗ୳ࡧΛճආͰ͖ΔͨΊ ۭؒͷεέʔϦϯάʹରͯ͠ ୳ࡧ࣌ؒେ͖͘ࠨӈ͞Εͳ͘ͳΔ ʘ Good! ʗ
“Chord” = Consistent Hashing + Finger Table ʘ βοΫϦͱཧղͯ͠Β͑ͨ ?
ʗ
࣮ࡍͷ “Chord” Ͱ ϊʔυΛ SHA-1(ip, port) Ͱஔͯ͠ ΩʔΛ SHA-1(key) Ͱஔ͢Δ
※SHA-1 ͳΒ 160 bit ͷۭؒͰදݱͰ͖Δ
·ͱΊ
ʑͬͯΔٕज़ ੈքதͷεΰΠਓ͕ͨͪߟ͑ͨ ΞϧΰϦζϜʹࢧ͑ΒΕ͍ͯΔʂ
ٕज़Λͨͩ͏͚ͩͰͳ͘ ཁૉٕज़Λཧղ͢Δ͜ͱॏཁʂ
To be continued …