Blog Post

How Zynga Survived FarmVille

Stay on Top of Enterprise Technology Trends

Get updates impacting your industry from our GigaOm Research Community
Join the Community!

When Zynga launched FarmVille last June, the company thought 200,000 daily active users in the first two months would be a success. Within eight weeks, the game had surpassed Zynga’s hits of the previous two years. For the first 26 weeks FarmVille added 1 million net new users per week; it currently has 70 million active users a month.

The story of Mark William’s last two years has been one of trying to support such unpredictable growth. “Zynga has been horrible in terms of its ability to predict its success,” said Williams, the company’s VP of network operations. Not that it’s a bad problem to have. Under his watch, Zynga has grown from a few dozen servers to “several thousand” — Williams said maybe he’ll give us a more specific number when he speaks at the GigaOM Structure conference later this month.

At the time of FarmVille’s launch, Zynga had just run out of data center space, so the company had to use Amazon’s (s amzn) EC2. That circumstance-based decision was extremely lucky, Williams said; given the game’s huge growth, without Amazon FarmVille would have failed.

Amazon allowed Williams to “acquire instances at will” using RightScale, which he called “absolutely key.” Zynga uses Apache PHP on the front end, memcached for active user play and MySQL on the back end. It uses memcached to store key value pairs to deal with active user play during sessions and then later writes it to disk.

Was it cost effective to lean on Amazon this hard? “We did spend a lot of money to make that possible,” Williams said, “but we also made up for that in terms of the success of the game and what it did to Zynga as a brand and our success later on.” Post-FarmVille, Zynga has a new model for rolling out game launches.

Now, within less than a day, Zynga can allocate a new game enough EC2 computing capacity to support 10 million daily active users. That pre-built environment should last even the wildest growing game at least five to eight weeks. Each game starts on EC2 and is watched for the next three to six months. If at any time growth goes flat or predictable, the game is transitioned off Amazon and into Zynga’s data centers where it can be optimized to work with those resources.

Williams tries to maintain a 50-50 split between using EC2 and data centers. At any one time, the split could be 30-70 or 70-30, depending on the ratio of new games to predictably growing ones. Williams said he doesn’t want to test Amazon’s capacity and he’d rather not have all his eggs in any one basket, but he values the ability to get big fast.

One of Williams’ next big projects is to help Zynga unify its infrastructure as it diversifies across new platforms including mobile. Right now, Zynga dedicates infrastructure separately for each social network’s instance of any one game. Now, with launches like Monday’s FarmVille for iPhone, there’s an increased emphasis on syncing one user’s experience between everywhere they play a game.

Want to hear more from Williams? Come to Structure in San Francisco, June 23 & 24.

18 Responses to “How Zynga Survived FarmVille”

  1. you have been saying we are going to get a candy basket for weeks…still no candy basket …I have 5oo candies in my gift box and want to get rid of them…got on this morning and you have taken all of my eggs.of all colors… while on on the subject of taking thing you took my pig pen and 20 of my pigs i waited for weeks to get it back nothing happened… so i bought a nother one… if you are going to take then you should at least give back with farmville dollars… i love the game and you guys are doing good just growing to fast… need to get all the things right before you grow more… thanks again and please give me back the money or the eggs i had about 3o eggs of all the colors….

  2. Max Longhin

    Pity the guy wasn’t asked about why the game doesn’t function properly anymore…. 7 million users left Farmville recently, that’s just under 10% of all Farmville users. Obviously just another greedy company not interested in its customers. A real disappointment for many.

  3. You do see a lot of FarmVille users on Facebook (although I don’t use it myself) so it was interesting to read about the strategies involved behind allowing that many people to use the application at once. Thanks :)

  4. Farmville has long since outgrown its ability to be fun. Major Load Times, out of sync, loss of game items, gifts, etc..even FRIENDS…geez…there is reason it’s called BETA. Loved it for a while but don’t have all day long to play anymore. Used to take 15 mins max…same stuff takes 2 hours…Done Done Done..and Gone Gone Gone from Farmville, Farm Town…and all that other Zynga junk!