Your game or app can go viral at any time\nYou need to be ready to scale and easily scale, it needs to be simple, rolling scale, no migrations\nYOu have to worry about your costs, games are cheap or free, and throughput is important\nYou can scale vertically and horizontally \nWhen you scaling this fast it&#x2019;s not uncommon to have new hardware and trying new things new, and there are inevitable failures. \nThings that are easy to deal with when you have lots of time, all of a sudden you have to deal with these same things with a lot of pressure and very little time.\n&#x201C;You&#x2019;re Database Tier better be Ready for this.&#x201D; It&#x2019;s the rate of change. \n\n
Transcript of "CCSF12_My_app_is_going_viral"
My App is Going Viral, Now What? 1
A New Unit of Measurement 1 Instagram ≈ 7.5M MAU* 2
InstaGrowth: Android Launch Instagram gained nearly 1 million users overnight when they expanded to Android 3
Draw Something - Social Game 35 million monthly active users in 1 month about 5 Instagrams (Instagram today is waaaay more than 1 Instagram) 4
By Contrast, 1/2 an Instagram The Simpson’s: Tapped Out Daily Active Users (millions) 6
Traditional MySQL + Memcached Architecture● Runas many MySQL machines as you need www.example.com● Data sharded evenly across the machines using client code App Servers● Memcached used to provide faster response time for users Memcached Tier and reduce load on the database MySQL Tier 7
Limitations of MySQL + Memcached● To scale you need to start using MySQL more simply● Replicating too slow● Sharding is Hard● Migration to Sharding Problematic● Code overhead to manage keeping memcache and mysql in sync● Lots of components to deploy Learn From Others - This Scenario Costs Time and Money. Scaling SQL is potentially disastrous when going Viral: very risky time for major code changes and migrations... you have no Time when skyrocketing up. Trim This Down, Make Stronger Points 8
Lessons Learned• Use Scalable Architecture• Be Fast on Your Feet• Be Connected with Experts• Learn more about NoSQL and Couchbase 9
How to Prepare for GrowthDo Everything Right What can go wrong? 10
What Can Go Wrong? Murphy’s Law Applies Shouting in the Datacenter - Fishworks / Sun http://www.youtube.com/watch?v=tDacjrSCeq4 11
Couchbase Architectural Promise• High Performance data access• Scale Up/Down Horizontally www.example.com• Always-On Availability• Flexible Schema Document Model App Servers Couchbase DatabaseSPLIT INTO 4 SLIDESWHY THEY MATTER FOR VIRAL APPS 13
Scalable Database●On-demand cluster sizing ● Grow or shrink with workload●Easy node provisioning Part of Previous ● All nodes are same/identical = simple provisioning●Multi-master Cross-Datacenter Replication ● For a fast and reliable user experience worldwide●Effective Auto-sharding ● Should avoid cluster hot spots 14
Sweet Spot: Fast and Growing Cisco and Solarflare benchmark of Couchbase Server Latency Throughput less than 1/2 ms grows linearly with cluster size 5 Nodes -- 1.75M operations per second 16
Things To Look at Evaluating● Find your Sweet Spot● Latency & Throughput● Query Needs ● Views (Map/Reduce Index & Query) ● Full Text Search with Elastic Search● Cloud/Hosted/SSD’s● Virality Potential● Read/Write Proportions 17
Query Needs● Are Key value look-ups sufficient?● Or do you need range scans on secondary indexes? Answers● Views with Range Queries● Full Text Search with Elastic Search● Geographic Queries 18
What color Maserati to get?When your app goes Viral,this is what you should beconcerned about, not your database. 19
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.