Scaleable Page Counter A gentle introduction to software engineering at Google scale Jon Tirsen, Google Monday, October 4, 2010
We’ve had visitors! Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
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
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
Counter Counter Counter Write Front End Shard by: random Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
Counter Counter Counter Front End Read fan out Monday, October 4, 2010
Front end Counter Counter Counter Blocking reads Monday, October 4, 2010
Front end Counter Counter Counter Async reads Monday, October 4, 2010
Monday, October 4, 2010
Counter Counter Counter Front End Write Monday, October 4, 2010
Counter Counter Counter Front End Read Monday, October 4, 2010
Availability Monday, October 4, 2010
Availability 14 mins/day 7 hours/month 99% = 3 days/year 1 Number of shards 1000 Monday, October 4, 2010
99.9999...% Availability Writing 99% 1 Number of shards 1000 Monday, October 4, 2010
99% Read fan out Availability 60% 0.6% 0.004% 1 Number of shards 1000 Monday, October 4, 2010
Update Counter Counter Counter Replicas Replicas Replicas Replica Replica Replica Replica Replica Replica Write Reads Front End Monday, October 4, 2010
8 nines 5 nines 99.99% 6 nines Availability Read fan out to 5 replicas 1 Number of shards 1000 Monday, October 4, 2010
Read & Cache Counter Counter Counter Write & Read Front End Monday, October 4, 2010
99.9999...% Availability Read fan out with caching 99% 1 Number of shards 1000 Monday, October 4, 2010
Monday, October 4, 2010
Consistency Monday, October 4, 2010
Read Probability Write Write Write Write Monday, October 4, 2010
Read Probability Write Write Write Write Monday, October 4, 2010
Read Probability Write Write Write Write Monday, October 4, 2010
Monday, October 4, 2010
200 299 52 Cached: 299 Front End Monday, October 4, 2010
200 299 52 Cached: 299, 52 Front End Monday, October 4, 2010
200 299 56 Cached: 299, 52 Front End Monday, October 4, 2010
200 302 56 Cached: 299, 52 Front End Monday, October 4, 2010
201 302 56 Cached: 299, 52 +1 1 0 2 552 =299+52+ Front End Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
Monday, October 4, 2010
A different solution... Monday, October 4, 2010
Read & sum Analyser Analyser Analysers Logs Logs Logs Push new count Append Front End Front End Front End Monday, October 4, 2010
Front End Counter Front End Log Analyser Monday, October 4, 2010
Analyser Push new count Front End Front End Front End Monday, October 4, 2010
Monday, October 4, 2010
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