Cloud World

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 4 February 2013

Scaling SongPop to 60 million users with App Engine and Google Cloud Storage

Posted on 11:41 by Unknown


Continuing our Developer Insights series, today’s guest bloggers are Olivier Michon, CTO, and Alexis Hanicotte, software engineer, from Fresh Planet, maker of the popular mobile application SongPop.  SongPop is a social application where players compete to be the fastest to guess the name of a song or artist.




SongPop is a social mobile app where players compete on who will be the fastest to guess a songs’ artist or title. It is a huge success for our very small team of just 6 engineers. We now have more than 60 million users, were the number 5 most downloaded iOS game of 2012, and went from 0 to more than 10k queries/second on our servers in less than 6 months. This has been made possible in large part because we run on Google App Engine.






App Engine allows us to quickly prototype, iterate and release our games.  We’ve been accumulating experience with the platform since 2009, but really saw the power of autoscaling once SongPop became a hit.





Our experience scaling with App Engine




SongPop was released in May 2012.  During our growth to our first 100,000 daily active users (DAU), our App Engine backend scaled smoothly.  This allowed us to spend our time making actual improvements to the game experience, while our user growth continued at a rapid pace.



We opened a Premier Account with App Engine around the time when we reached 100,000 DAU which gave us access to live customer support.  It came in handy when we encountered two downtimes, with one lasting just 10 minutes and the other for 1 hour.  But we were able to promptly reach Premier Support and had Google engineers investigate these issues with us.  



Once we reached 500,000 DAU, we applied a variety of optimization ideas to reduce latency.  For example, we used to have user data spread over many models, but we combined them into a single entry in the Datastore to reduce read operations.  We also often needed the list of a user’s opponents, so instead of querying every time, we cached this result using Memcache.  It only took one engineer and just 4 days of work to reduce the latency with these optimizations.   



As we reached the milestone of 1 million DAU, some Datastore queries (used to find random opponents in the game) showed high latencies and a high rate of timeouts.  We had to enforce deadlines, implement better fallbacks and identified, with the help of Premier Support, that degraded performance came from the fact that our queries were relying on many different indexed properties.  So the solution was simple - either add a composite index with all the properties we needed or combine into a single one.



Using App Engine + Google Cloud Storage



For each game session, our users need to download song samples in order to play. It is critical that this data gets delivered fast and reliably wherever the user is located. We chose to use Google Cloud Storage for this use case.   It has proved to provide high performance content delivery, as we have been able to serve 17 terabytes/day of songs and images worldwide.


In addition to its reliability, Cloud Storage is great because of its integration with App Engine. We can easily read and write files from our application to Cloud Storage using the same syntax as we would use to write local files (using Python). We found it intuitive and convenient because you do not have to manage opaque keys to retrieve your files (just use the path you specified), and you can browse your files through a directory-like structure. Cloud Storage also allows you to manage access rights, can be used with Google BigQuery, and it is priced affordably compared to other solutions we considered.









Architecture diagram of SongPop









Long live App Engine!






When we speak to other game developers, we always recommend that they use App Engine.  We’ve used other services such as EC2 from Amazon Web Services for other games before, but we’ve found App Engine to be a better service for our needs.  We don’t want to spend time setting up servers and load balancing, when we could instead use that time to build great games and let our service provider handle the infrastructure for us.






When we compare the development of SongPop to stories of other apps, we’re thankful that App Engine allowed us to have only one engineer working full-time on the backend portion of our app.  Even better, he was able to do additional work on adding new features to the game instead of solely focusing on infrastructure issues.  With App Engine, scaling our game was easy.





Others things we want to share




  • Do not worry if documented resources limits and rates look too small, they are just there to make sure one app does not abuse any resource, but they can scale. Most of our limits have been increased by 18-fold! We had days where we made 230,000,000 UrlFetch API calls, for instance.

  • The Location headers is a really great feature,  because it is easily accessible for a wide variety of use cases, such as selecting users’ opponents or building their game profile.




Contributed by Olivier Michon and Alexis Hanicotte, FreshPlanet



Posted by Zafir Khan, Product Marketing Manager, Google App Engine

Email ThisBlogThis!Share to XShare to Facebook
Posted in cloud-storage, developer-insights | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • A Day in the Cloud, new articles on scaling, and fresh open source projects for App Engine
    The latest release of Python SDK 1.2.3, which introduced the Task Queue API and integrated support for Django 1.0, may have received a lot ...
  • Tutorial: Adding a cloud backend to your application with Android Studio
    Android Studio lets you easily add a cloud backend to your application, right from your IDE. A backend allows you to implement functionality...
  • Pushing Updates with the Channel API
    If you've been watching Best Buy closely, you already know that Best Buy is constantly trying to come up with new and creative ways to...
  • Google App Engine takes the pain out of sending iOS push notifications
    Delivering scalable, reliable mobile push notifications when hundreds of thousands of users have installed your app on their phones can be a...
  • Outfit 7’s Talking Friends built on Google App Engine, recently hit one billion downloads
    Today’s guest blogger is Igor Lautar, senior director of technology at Outfit7 (Ekipa2 subsidiary), one of the fastest-growing media enterta...
  • Jump-start your data pipelining into Google BigQuery
    Once you get your data into Google BigQuery , you don’t have to worry about running out of machine capacity, because you use Google’s machin...
  • Bridging Mobile Backend as a Service to Enterprise Systems with Google App Engine and Kinvey
    The following post was contributed by Ivan Stoyanov , VP of Engineering for Kinvey, a mobile Backend as a Service provider and Google Cloud ...
  • New in Google Cloud Storage: auto-delete, regional buckets and faster uploads
    We’ve launched new features in Google Cloud Storage that make it easier to manage objects, and faster to access and upload data. With a tiny...
  • DataStax Enterprise feels right at home in Google Compute Engine
    Today’s guest post comes from Martin Van Ryswyk, Vice President of Engineering at DataStax. The cloud promises many things for database user...
  • TweetDeck and Google App Engine: A Match Made in the Cloud
    I'm Reza and work in London, UK for a startup called TweetDeck . Our vision is to develop the best tools to manage and filter real time ...

Categories

  • 1.1.2
  • agile
  • android
  • Announcements
  • api
  • app engine
  • appengine
  • batch
  • bicycle
  • bigquery
  • canoe
  • casestudy
  • cloud
  • Cloud Datastore
  • cloud endpoints
  • cloud sql
  • cloud storage
  • cloud-storage
  • community
  • Compute Engine
  • conferences
  • customer
  • datastore
  • delete
  • developer days
  • developer-insights
  • devfests
  • django
  • email
  • entity group
  • events
  • getting started
  • google
  • googlenew
  • gps
  • green
  • Guest Blog
  • hadoop
  • html5
  • index
  • io2010
  • IO2013
  • java
  • kaazing
  • location
  • mapreduce
  • norex
  • open source
  • partner
  • payment
  • paypal
  • pipeline
  • put
  • python
  • rental
  • research project
  • solutions
  • support
  • sustainability
  • taskqueue
  • technical
  • toolkit
  • twilio
  • video
  • websockets
  • workflows

Blog Archive

  • ▼  2013 (143)
    • ►  December (33)
    • ►  November (15)
    • ►  October (17)
    • ►  September (13)
    • ►  August (4)
    • ►  July (15)
    • ►  June (12)
    • ►  May (15)
    • ►  April (4)
    • ►  March (4)
    • ▼  February (9)
      • Improve your App Engine skills with Google Develop...
      • Deploying App Engine apps with DevTable
      • New Google Cloud Platform case studies - including...
      • Google Cloud Platform introduces new support packages
      • Java 7 and Cloud Endpoints Preview
      • New Google App Engine training videos now available
      • App Engine 1.7.5 Released
      • Research Projects on Google App Engine
      • Scaling SongPop to 60 million users with App Engin...
    • ►  January (2)
  • ►  2012 (43)
    • ►  December (2)
    • ►  November (2)
    • ►  October (8)
    • ►  September (2)
    • ►  August (3)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (5)
    • ►  February (3)
    • ►  January (5)
  • ►  2011 (46)
    • ►  December (3)
    • ►  November (4)
    • ►  October (4)
    • ►  September (5)
    • ►  August (3)
    • ►  July (4)
    • ►  June (3)
    • ►  May (8)
    • ►  April (2)
    • ►  March (5)
    • ►  February (3)
    • ►  January (2)
  • ►  2010 (38)
    • ►  December (2)
    • ►  October (2)
    • ►  September (1)
    • ►  August (5)
    • ►  July (5)
    • ►  June (6)
    • ►  May (3)
    • ►  April (5)
    • ►  March (5)
    • ►  February (2)
    • ►  January (2)
  • ►  2009 (47)
    • ►  December (4)
    • ►  November (3)
    • ►  October (6)
    • ►  September (5)
    • ►  August (3)
    • ►  July (3)
    • ►  June (4)
    • ►  May (3)
    • ►  April (5)
    • ►  March (3)
    • ►  February (7)
    • ►  January (1)
  • ►  2008 (46)
    • ►  December (4)
    • ►  November (3)
    • ►  October (10)
    • ►  September (5)
    • ►  August (6)
    • ►  July (4)
    • ►  June (2)
    • ►  May (5)
    • ►  April (7)
Powered by Blogger.

About Me

Unknown
View my complete profile