MySQL hiccups were becoming more
frequent Everything was running ﬁne ... ... and then DB throughput went down to 10% A]er a few minutes everything stabilizes again ... ... just to repeat the cycle 20 minutes later!

We started to shard on
model, too We put this table in 2 extra shards 1) Setup new masters as slaves of old ones old old new master slave master

We started to shard on
model, too We put this table in 2 extra shards 1) Setup new masters as slaves of old ones old old new new master slave master slave

We started to shard on
model, too We put this table in 2 extra shards 1) Setup new masters as slaves of old ones 2) App servers start using new masters, too old old new new master slave master slave

We started to shard on
model, too We put this table in 2 extra shards 1) Setup new masters as slaves of old ones 2) App servers start using new masters, too 3) Cut replica5on old old new new master slave master slave

We started to shard on
model, too We put this table in 2 extra shards 1) Setup new masters as slave of old ones 2) App servers start using new masters, too 3) Cut replica5on 4) Truncate not-­‐used tables old old new new master slave master slave

If MySQL is a truck...
Fast enough for reads Can store on disk Robust replicaGon hp://www.ﬂickr.com/photos/erix/245657047/

If MySQL is a truck,
Redis is a Ferrari Fast enough for reads Super fast reads/writes Can store on disk Out of memory => dead Robust replicaGon Fragile replicaGon hp://www.ﬂickr.com/photos/erix/245657047/