dhts and sharding
play

DHTs and Sharding Aurojit Panda Announcements Announcements Fill - PowerPoint PPT Presentation

DHTs and Sharding Aurojit Panda Announcements Announcements Fill out the Github consent form. Announcements Fill out the Github consent form. Fill out the Github account association form. Announcements Fill out the Github


  1. Consistent Hashing • Depends on what hashing algorithm you use. • But one pretty common strategy (with some additional details missing) 16 buckets h: h[k] = v

  2. Consistent Hashing • Depends on what hashing algorithm you use. • But one pretty common strategy (with some additional details missing) 16 buckets h: h[k] = v h[hash(k) % len(h)] = v

  3. Consistent Hashing • Depends on what hashing algorithm you use. • But one pretty common strategy (with some additional details missing) 16 buckets h: h[k] = v h[hash(k) % len(h)] = v h[hash(k) % 16] = v

  4. Consistent Hashing • Depends on what hashing algorithm you use. • But one pretty common strategy (with some additional details missing) 16 buckets h: v h[k] = v h[hash(k) % len(h)] = v h[hash(k) % 16] = v

  5. Consistent Hashing 16 buckets h: v h[k] = v h[hash(k) % len(h)] = v h[hash(k) % 16] = v x = h[k]

  6. Consistent Hashing 16 buckets h: v h[k] = v h[hash(k) % len(h)] = v h[hash(k) % 16] = v x = h[k] x = h[hash(k) % len(h)]

  7. Consistent Hashing 16 buckets h: v h[k] = v h[hash(k) % len(h)] = v h[hash(k) % 16] = v x = h[k] x = h[hash(k) % len(h)] x = h[hash(k) % 16]

  8. Consistent Hashing 20 buckets h: v x = h[k] x = h[hash(k) % len(h)] x = h[hash(k) % 16] Added 4 buckets x = h[k] x = h[hash(k) % len(h)] x = h[hash(k) % 20]

  9. Consistent Hashing 20 buckets h: v x = h[k] x = h[hash(k) % len(h)] How many items need to move? x = h[hash(k) % 16] Added 4 buckets x = h[k] x = h[hash(k) % len(h)] x = h[hash(k) % 20]

  10. Consistent Hashing • David Karger, et al. 1997 at MIT: Mechanism to minimize reassignments.

  11. Consistent Hashing • David Karger, et al. 1997 at MIT: Mechanism to minimize reassignments. • Monotonicity : When buckets are added items move from old to new .

  12. Consistent Hashing • David Karger, et al. 1997 at MIT: Mechanism to minimize reassignments. • Monotonicity : When buckets are added items move from old to new . • No items move between old buckets.

  13. Consistent Hashing • David Karger, et al. 1997 at MIT: Mechanism to minimize reassignments. • Monotonicity : When buckets are added items move from old to new . • No items move between old buckets. • Also require other properties (e.g., balance) which are more traditional.

  14. Consistent Hashing

  15. Consistent Hashing • Map each bucket to a point in the unit interval .

  16. Consistent Hashing • Map each bucket to a point in the unit interval . • How? Use a hash function h b .

  17. Consistent Hashing • Map each bucket to a point in the unit interval . • How? Use a hash function h b . • Map each key to a point in the unit interval .

  18. Consistent Hashing • Map each bucket to a point in the unit interval . • How? Use a hash function h b . • Map each key to a point in the unit interval . • How? Use another hash function h k .

  19. Consistent Hashing • Map each bucket to a point in the unit interval . • How? Use a hash function h b . • Map each key to a point in the unit interval . • How? Use another hash function h k . • Map key k to bucket b such that: |h k (k) - h b (b)| is minimal.

  20. Consistent Hashing • Map each bucket to a point in the unit interval . • How? Use a hash function h b . • Map each key to a point in the unit interval . • How? Use another hash function h k . • Map key k to bucket b such that: |h k (k) - h b (b)| is minimal. • Is this sufficient for monotonicity?

  21. Chord • Use consistent hashing to build a distributed hash table. • Keys must be allocated across different nodes. • Balanced, i.e., no more than (1 + ε )K/N keys go to a single node. • Minimize amount of data that needs to be synchronized. • Especially important when nodes leave or join.

  22. Chord Slow Lookup 2 1 35 Successor pointer

  23. Chord Slow Lookup lookup(k) 2 hash(k) = 7 1 35 Successor pointer

  24. Chord Slow Lookup lookup(k) 2 hash(k) = 7 1 35 Successor pointer

  25. Chord Join 2: ... 2 37: ... 1 42: ... 3: ... 35 0: ... 4: ... 27: ... Successor pointer

  26. Chord Join 2: ... 2 8 37: ... 1 42: ... 3: ... 35 0: ... 4: ... 27: ... Successor pointer

  27. Chord Join 2: ... 2 8 37: ... 1 42: ... 3: ... 35 0: ... 4: ... 27: ... Predecessor pointer Successor pointer

  28. Chord Join 2: ... 2 8 37: ... 1 42: ... 3: ... 35 0: ... 4: ... 27: ... Predecessor pointer Successor pointer

  29. Chord Join 2: ... 2 8 3: ... 4: ... 37: ... 1 42: ... 27: ... 35 0: ... Predecessor pointer Successor pointer

  30. Chord Leave 2: ... 2 8 3: ... 4: ... 37: ... 1 42: ... 27: ... 35 0: ... Predecessor pointer Successor pointer

  31. Chord Leave 2: ... 2 37: ... 1 42: ... 27: ... 35 0: ... Predecessor pointer Successor pointer

  32. Chord Leave 2: ... 2 Oops: Need successor list to fix this problem 37: ... 1 42: ... 27: ... 35 0: ... Predecessor pointer Successor pointer

  33. Chord Leave 2: ... 2 37: ... 1 42: ... 27: ... 35 0: ... Predecessor pointer Successor pointer

  34. Fingers 0 2 3.lookup(k) 38 hash(k) = 42 3 34 6 32 30 8 m=6 (2 m = 64) 28 10 26 12 24 14 22 16 20 18

  35. Fingers 0 2 3.lookup(k) 38 hash(k) = 42 3 34 6 32 30 8 m=6 (2 m = 64) 28 10 26 12 24 14 22 16 20 18

  36. <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qL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kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> Fingers 0 2 3.lookup(k) 38 hash(k) = 42 3 34 6 32 30 8 m=6 (2 m = 64) 28 10 26 12 24 14 22 16 20 18 finger[ k ] = succ( n + 2 k − 1 ) mod 2 m ) Finger

  38. <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6F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9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> Fingers 0 2 3.lookup(k) 38 hash(k) = 42 3 34 1 6 32 30 8 m=6 (2 m = 64) 28 10 26 12 24 14 22 16 20 18 finger[ k ] = succ( n + 2 k − 1 ) mod 2 m ) Finger

  39. <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQ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7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> Fingers 0 2 3.lookup(k) 38 hash(k) = 42 3 34 1 2 6 32 30 8 m=6 (2 m = 64) 28 10 26 12 24 14 22 16 20 18 finger[ k ] = succ( n + 2 k − 1 ) mod 2 m ) Finger

  40. <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl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5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> Fingers 0 2 3.lookup(k) 38 hash(k) = 42 3 34 1 2 6 32 3 30 8 m=6 (2 m = 64) 28 10 26 12 24 14 22 16 20 18 finger[ k ] = succ( n + 2 k − 1 ) mod 2 m ) Finger

  41. <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACH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waxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> Fingers 0 2 3.lookup(k) 38 hash(k) = 42 3 34 1 2 6 32 3 30 8 m=6 (2 m = 64) 28 10 26 4 12 24 14 5 22 16 20 18 finger[ k ] = succ( n + 2 k − 1 ) mod 2 m ) Finger

  43. <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VTIEN8/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> <latexit sha1_base64="o0lJPfhPEwESip2b8DuHRmlkxGM=">ACHnicbVDLSgMxFM34tr6qLt0Ei6CIZUYU3QiG5cKVoV2LJn0Tg1NMkNyRyzDfIkbf8WNC0UEV/o3po+FrwMXTs65l9x7olQKi7/6Y2Mjo1PTE5Nl2Zm5+YXyotLFzbJDIcaT2RiriJmQoNRQo4So1wFQk4TLqHPf8y1swViT6HLsphIq1tYgFZ+ikZnm3gXCHeSx0G0xR74T0gA4km3FerGu6Sbev85WUGzQhkpa7qU2muWKX/X7oH9JMCQVMsRps/zeaCU8U6CRS2ZtPfBTDHNmUHAJRamRWUgZ7A21B3VT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/5BV1zSovGiXGlkfbV7xM5U9Z2VeQ6FcMb+9vrif959Qzj/TAXOs0QNB98FGeSYkJ7WdGWMBRdh1h3Ai3K+U3zDCOLtGSCyH4fJfcrFdDfxqcLZTOTwaxjFVsgqWScB2SOH5ISckhrh5J48kmfy4j14T96r9zZoHfGM8vkB7yPLztQoTU=</latexit> Fingers 0 2 3.lookup(k) 6 38 hash(k) = 42 3 34 1 2 6 32 3 30 8 m=6 (2 m = 64) 28 10 26 4 12 24 14 5 22 16 20 18 finger[ k ] = succ( n + 2 k − 1 ) mod 2 m ) Finger

  44. Some Concerns • What happens with simultaneous joins and leaves? • Can you ever loose track of a node? • Can you ever get to a state where a node joins and then disappears?

  45. An aside on hashing • Why SHA-1/SHA-256/...?

  46. An aside on hashing • Why SHA-1/SHA-256/...? • Do we need cryptographic hash functions for this purpose?

  47. An aside on hashing • Why SHA-1/SHA-256/...? • Do we need cryptographic hash functions for this purpose? • There are other hash functions that are much faster to compute.

  48. An aside on hashing • Why SHA-1/SHA-256/...? • Do we need cryptographic hash functions for this purpose? • There are other hash functions that are much faster to compute. • Why are cryptographic hash functions well suited to this purpose?

  49. Two Problems - One Solution? • Distributed data storage and management. • Load distribution.

  50. Sharding and Load Balancing

Recommend


More recommend