providing flexible consistency levels with manhattan at
play

Providing Flexible Consistency Levels with Manhattan at Twitter - PowerPoint PPT Presentation

Providing Flexible Consistency Levels with Manhattan at Twitter Boaz Avital @bx BOAZ AVITAL Tech Lead, Core Storage @bx M A N H AT TA N USING MANHATTAN Self service creation of applications and datasets Large multitenant clusters


  1. Providing Flexible Consistency Levels with Manhattan at Twitter Boaz Avital @bx

  2. BOAZ AVITAL Tech Lead, Core Storage @bx

  3. M A N H AT TA N

  4. USING MANHATTAN Self service creation of applications and datasets Large multitenant clusters Seamless global replication Automatic observability and alerting # T W I T T E R M A N H AT TA N

  5. ADOPTION More use cases need more features Use cases you designed for Use cases you didn't # T W I T T E R M A N H AT TA N

  6. ADOPTION More use cases need more features { Use cases you Pain! designed for Use cases you didn't # T W I T T E R M A N H AT TA N

  7. BUILDING NEW FEATURES ONE THING ALL THINGS EVERYTHING DO ONE AND THE THING WELL KITCHEN SINK Too many running services with slightly di ff erent code and Bloated software that’s not that tooling good at anything # T W I T T E R M A N H AT TA N

  8. A R C H I T E C T U R E # T W I T T E R M A N H AT TA N

  9. ARCHITECTURE: DATA MODEL partitioning key local key value 437698567 profile, username “@womeng” # T W I T T E R M A N H AT TA N

  10. ARCHITECTURE: DATA MODEL partitioning key local key value 437698567 profile, username “@womeng” 437698567 profile, image “https:/ /pbs.twimg.com…” 437698567 tweets, 70309… “In which our Periscope…” 437698567 tweets, 70260… “Boston, @WomenWhoC…” 53205685 profile, username “@bx” 53205685 profile, image “https:/ /pbs.twimg.com…” 53205685 tweets, 710573… “Strong consistency in…” 53205685 tweets, 709182… “Anyone else having issu…” # T W I T T E R M A N H AT TA N

  11. ARCHITECTURE: PARTITIONING shards partitioning key 437698567 53205685 # T W I T T E R M A N H AT TA N

  12. ARCHITECTURE: PARTITIONING shards partitioning key 437698567 53205685 # T W I T T E R M A N H AT TA N

  13. ARCHITECTURE: PARTITIONING shards partitioning key 437698567 53205685 # T W I T T E R M A N H AT TA N

  14. ARCHITECTURE: MESSAGING C C C C # T W I T T E R M A N H AT TA N

  15. ARCHITECTURE: CONSISTENCY Dynamo + Last Write Wins # T W I T T E R M A N H AT TA N

  16. ARCHITECTURE: CONSISTENCY Dynamo + Last Write Wins # T W I T T E R M A N H AT TA N

  17. ARCHITECTURE: CONSISTENCY Dynamo + Last Write Wins # T W I T T E R M A N H AT TA N

  18. ARCHITECTURE: CONSISTENCY Replica Reconciliation # T W I T T E R M A N H AT TA N

  19. BENEFITS OF EVENTUAL CONSISTENCY AVAILABILITY LATENCY SIMPLICITY # T W I T T E R M A N H AT TA N

  20. WHEN IT’S NOT ENOUGH ? reserve() @justinbieber ? reserve() # T W I T T E R M A N H AT TA N

  21. WHEN IT’S NOT ENOUGH reserve() reserve() # T W I T T E R M A N H AT TA N

  22. WHEN IT’S NOT ENOUGH @username is free @username is free @username claimed by 53205685 # T W I T T E R M A N H AT TA N

  23. ADAPTING ARCHITECTURE Logs! TWITTER DISTRIBUTEDLOG APACHE BOOKKEEPER # T W I T T E R M A N H AT TA N

  24. ADAPTING ARCHITECTURE Operations read write compare-and-set increment # T W I T T E R M A N H AT TA N

  25. ADAPTING ARCHITECTURE Check: @username → free Set: @username → 53205685 Check: @username → free Set: @username → 20719205 # T W I T T E R M A N H AT TA N

  26. ADAPTING ARCHITECTURE C C C C # T W I T T E R M A N H AT TA N

  27. ADAPTING ARCHITECTURE C C C C # T W I T T E R M A N H AT TA N

  28. ADAPTING ARCHITECTURE C C C C # T W I T T E R M A N H AT TA N

  29. ADAPTING ARCHITECTURE C C C C # T W I T T E R M A N H AT TA N

  30. ADAPTING ARCHITECTURE C C C C # T W I T T E R M A N H AT TA N

  31. RESULTS WHAT WE’VE GAINED In order updates for keys (but not full transactions) Failure isolation at shard level Mixing strong and eventual consistency in a cluster Mixing strong and eventual consistency in a dataset WHAT WE’VE LOST A few 10s of milliseconds added to average latency Latency hiccups during failures Potential for stream halts on error # T W I T T E R M A N H AT TA N

  32. C O N S E Q U E N C E S # T W I T T E R M A N H AT TA N

  33. A DIFFERENT CONSISTENCY MODEL EVENTUAL CONSISTENCY y, v2 x, v1 y, v2 x, v1 y, v2 y, v2 x, v1 y, v2 # T W I T T E R M A N H AT TA N

  34. A DIFFERENT CONSISTENCY MODEL STRONG CONSISTENCY x, a1 y y x, b1 y, b2 y x, c1 y, c2 # T W I T T E R M A N H AT TA N

  35. A DIFFERENT CONSISTENCY MODEL NO MORE REPLICA RECONCILIATION # T W I T T E R M A N H AT TA N

  36. A DIFFERENT CONSISTENCY MODEL BACKFILL AND DATA MIGRATION Live requests Backfill data # T W I T T E R M A N H AT TA N

  37. A DIFFERENT TOPOLOGY TRANSITION Old New # T W I T T E R M A N H AT TA N

  38. A DIFFERENT TOPOLOGY TRANSITION 2 3 1 # T W I T T E R M A N H AT TA N

  39. A DIFFERENT DEFINITION OF TIME x x, ttl=1001 now=1000 x, ttl=1001 ⍉ now=1003 x, ttl=1001 ⍉ now=1002 # T W I T T E R M A N H AT TA N

  40. A DIFFERENT DEFINITION OF TIME expire value x write value x check for x, set y write value x expire value x check for x, set y write value x check for x, set y expire value x external time # T W I T T E R M A N H AT TA N

  41. A DIFFERENT DEFINITION OF TIME x, ttl=1001 now=1000 now = 1002 x, ttl=1001 now=1002 x, ttl=1001 now=1002 # T W I T T E R M A N H AT TA N

  42. WHAT THE USER SEES Provisioning Querying # T W I T T E R M A N H AT TA N

  43. T H A N K YO U @ B X

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend