scaleable page counter
play

Scaleable Page Counter A gentle introduction to software - PowerPoint PPT Presentation

Scaleable Page Counter A gentle introduction to software engineering at Google scale Jon Tirsen, Google Monday, October 4, 2010 Weve had visitors! Monday, October 4, 2010 Monday, October 4, 2010 Monday, October 4, 2010 Monday, October


  1. Scaleable Page Counter A gentle introduction to software engineering at Google scale Jon Tirsen, Google Monday, October 4, 2010

  2. We’ve had visitors! Monday, October 4, 2010

  3. Monday, October 4, 2010

  4. Monday, October 4, 2010

  5. Monday, October 4, 2010

  6. Monday, October 4, 2010

  7. Monday, October 4, 2010

  8. Monday, October 4, 2010

  9. Counter 112 +1 Front End Front End Front End Front End Front End Front End Front End Front End Front End Monday, October 4, 2010

  10. Counter Counter Counter Front End Front End Front End Front End Front End Front End Front End Front End Front End Monday, October 4, 2010

  11. Counter Counter Counter Write Front End Shard by: random Monday, October 4, 2010

  12. Monday, October 4, 2010

  13. Monday, October 4, 2010

  14. Counter Counter Counter Front End Read fan out Monday, October 4, 2010

  15. Front end Counter Counter Counter Blocking reads Monday, October 4, 2010

  16. Front end Counter Counter Counter Async reads Monday, October 4, 2010

  17. Monday, October 4, 2010

  18. Counter Counter Counter Front End Write Monday, October 4, 2010

  19. Counter Counter Counter Front End Read Monday, October 4, 2010

  20. Availability Monday, October 4, 2010

  21. Availability 14 mins/day 7 hours/month 99% = 3 days/year 1 Number of shards 1000 Monday, October 4, 2010

  22. 99.9999...% Availability Writing 99% 1 Number of shards 1000 Monday, October 4, 2010

  23. 99% Read fan out Availability 60% 0.6% 0.004% 1 Number of shards 1000 Monday, October 4, 2010

  24. Update Counter Counter Counter Replicas Replicas Replicas Replica Replica Replica Replica Replica Replica Write Reads Front End Monday, October 4, 2010

  25. 8 nines 5 nines 99.99% 6 nines Availability Read fan out to 5 replicas 1 Number of shards 1000 Monday, October 4, 2010

  26. Read & Cache Counter Counter Counter Write & Read Front End Monday, October 4, 2010

  27. 99.9999...% Availability Read fan out with caching 99% 1 Number of shards 1000 Monday, October 4, 2010

  28. Monday, October 4, 2010

  29. Consistency Monday, October 4, 2010

  30. Read Probability Write Write Write Write Monday, October 4, 2010

  31. Read Probability Write Write Write Write Monday, October 4, 2010

  32. Read Probability Write Write Write Write Monday, October 4, 2010

  33. Monday, October 4, 2010

  34. 200 299 52 Cached: 299 Front End Monday, October 4, 2010

  35. 200 299 52 Cached: 299, 52 Front End Monday, October 4, 2010

  36. 200 299 56 Cached: 299, 52 Front End Monday, October 4, 2010

  37. 200 302 56 Cached: 299, 52 Front End Monday, October 4, 2010

  38. 201 302 56 Cached: 299, 52 +1 1 0 2 552 =299+52+ Front End Monday, October 4, 2010

  39. Monday, October 4, 2010

  40. Monday, October 4, 2010

  41. Monday, October 4, 2010

  42. Monday, October 4, 2010

  43. A different solution... Monday, October 4, 2010

  44. Read & sum Analyser Analyser Analysers Logs Logs Logs Push new count Append Front End Front End Front End Monday, October 4, 2010

  45. Front End Counter Front End Log Analyser Monday, October 4, 2010

  46. Analyser Push new count Front End Front End Front End Monday, October 4, 2010

  47. Monday, October 4, 2010

  48. Sharding Shard selection: random, by user, by document Fan out: writes, reads Replication/Caching Consistency model: eventual, shard local Sync -> Async Questions? tirsen@google.com Twitter: @tirsen Monday, October 4, 2010

Recommend


More recommend