building a skyscraper with legos
play

Building a Skyscraper with Legos: The Anatomy of a Distributed - PowerPoint PPT Presentation

Building a Skyscraper with Legos: The Anatomy of a Distributed System Tyler McMullen @tbmcmullen ok, whats up? Lets build a distributed system! The Project 50+ Datacenters Thousands of bare metal servers up to 64 Servers per


  1. Building a Skyscraper with Legos: The Anatomy of a Distributed System

  2. Tyler McMullen @tbmcmullen

  3. ok, what’s up?

  4. Let’s build a distributed system!

  5. The Project

  6. 50+ Datacenters Thousands of bare metal servers up to 64 Servers per Datacenter Ten of Thousands of Origin Servers

  7. Recap

  8. Still with me?

  9. One Possible Solution

  10. (Too) Strong Consistency

  11. Eventual Consistency

  12. Forward Progress

  13. Ownership

  14. Rendezvous Hashing

  15. origin server we’re deciding on the owner of hash function we decided upon h(S n ,O) = W n set of live servers the weight or priority

  16. priorities(O 1 ) = [S 2 , S 3 , S 1 , S 4 , …]

  17. priorities(O 2 ) = [S 4 , S 2 , S 3 , S 1 , …]

  18. Failure Detection

  19. u up? ✅ 1 2 5 3 4

  20. ✅ 1 2 5 3 4

  21. ❌ 1 2 5 3 4

  22. Memberlist

  23. Gossip

  24. Push and Pull

  25. Convergence

  26. Causality

  27. Arugula Calzone Jack Burgers Daal Jill Burgers happened-before Calzone Arugula happened-before Burgers Calzone is-concurrent-with Daal Burgers happened-before Daal

  28. Lattices

  29. Causality

  30. Version Vectors

  31. [1,0,0] S 1 [1,0,0] [1,1,0] [1,1,1] [1,2,1] S 2 [0,0,1] S 3

  32. [0,0,0] [1,0,0] [0,1,0] [0,0,1] [1,1,0] [1,1,1] [2,1,1] [1,1,2]

  33. Coordination-free Distributed Map

  34. Version Merge Delta

  35. Δ -CRDT Map

  36. type SharedMap struct { storage map[Key]SharedMapRecord v clock.VersionVector } type SharedMapRecord struct { value Value dot clock.VVDot }

  37. Send_Version: Send our Version Vector.

  38. Received_Version( V ): For each record( R ) in our map: If ( V happened-before R .Dot) OR ( V is-concurrent-with R .Dot): Add R to Delta. Send Delta.

  39. Received_Delta( D ): V = Our Version Vector For each record( R ) in D : If R .Dot happened-before V : Skip it. R’ = Local Record If R’ .Dot happened-before D .Version: Merge it. R and R’ are concurrent: ✨

  40. ✨ = Rendesvous

  41. Delta-state CRDT Map

  42. Ok, why?

  43. Edge Compute

  44. Coordination-free Distributed Systems

  45. Single System Image

  46. We posit that striving for distributed systems that provide “single system image” semantics is fundamentally flawed and at odds with how systems operate in the physical world.

  47. We need new metaphors.

  48. We need new intuition.

  49. Thank You. @tbmcmullen

Recommend


More recommend