Skip to content

January 5, 2012


Zynga’s Z-Cloud Infrastructure

by Ravi Kalakota

Cloud Computing when done right can be a source of significant competitive advantage.

Case in point Zynga, the social gaming company.

Zynga, founded in 2007, is the world’s largest social game developer with more than 250 million monthly active users playing their games, which include CityVille, FarmVille, FrontierVille, Words With Friends, Mafia Wars, Zynga Poker, Café World and Treasure Isle.

Zynga games are available on a number of global platforms including Facebook, MySpace, Yahoo, the iPad and iPhone, and Android devices.

Zynga makes most of its revenue by serving the 800m audience on Facebook.

Social games powered by Facebook represent a new form of entertainment that will capture an increasing proportion of consumer leisure time.  The potential is huge.  One data point… my 72 year old mother-in law spends hours playing games on her iPad.

Social games are the most popular applications on Facebook and will be, a key driver of engagement on social networks, and increasingly on mobile platforms.

Games have become the second most popular internet activity based on time spent, and have even surpassed email.

To support this growth, Zynga  created a scalable hybrid cloud-based server and network infrastructure that enables it to deliver games to millions of players simultaneously with high levels of performance and reliability.

According to Zynga’s S-1 filing:

“Our physical network infrastructure utilizes a mixture of our own datacenters and public cloud datacenters (Amazon EC2) linked with high-speed networking. We utilize commodity hardware, and our architecture is designed for high availability and fault tolerance while accommodating the demands of social game play.

We have developed our architecture to work effectively in a flexible cloud environment that has a high degree of elasticity. For example, our automatic provisioning tools have enabled us to add up to 1,000 servers in a 24-hour period in response to game demand. We operate at a scale that routinely delivers more than one petabyte of content per day. We intend to invest in and use more of our own infrastructure going forward, which we believe will provide us with an even better cost profile and position us to further drive operating leverage.”

Zynga’s Z Cloud Infrastructure

Zynga’s environment, zCloud, is a hybrid cloud model.   Games are launched using Amazon’s EC2 Infrastructure as a Service (IaaS) platform for the initial capacity required.  Once a game hits a more predictable demand pattern, Zynga migrates the game in-house to run on zCloud.  zCloud is designed to function similar to EC2 in the way it provisions, tracks, and manages both physical and virtual machines.

Zynga uses (now owned by Citrix) for its private cloud infrastructure, as well as RightScale as a management layer that makes for a uniform experience in terms of managing both public and private resources.

The private cloud component of its infrastructure is built using’s CloudStack software. is an open source cloud computing platform for building and managing private and public cloud infrastructure. is essentially a commodity cloud based on AWS design principles and using XenServer at the core.  More than 60 large-scale production clouds have been deployed using the open source CloudStack, including GoDaddy, GreenQloud, KT, Nokia, and Zynga.

RightScale provides the management interface for both Zynga’s public EC2 resources and private resources, allowing Zynga to easily migrate games from Amazon to using the same configuration templates. Rightscale provides a simplified single “pane of glass” front-end to provision zCloud or AWS instances.

Zynga’s Amazon EC2 Strategy

Zynga uses Amazon Web Services (EC2 in particular) as a staging ground before ultimately moving games onto private cloud resources.  Amazon’s EC2 cloud lets Zynga scale elastically and determine average traffic load and other metrics, so that it can optimize its internal infrastructure for each game’s specific needs.

Amazon EC2 allows Zynga to acquire “instances at will” using RightScale.  This allows them to scale quickly. For example, when Zynga launched FarmVille on Facebook in 2010, 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 six months, FarmVille added 1 million net new users per week; it has more than 70 million active users a month.

Value of Amazon EC2…. Scalability. 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.  FarmVille grew to 43 million monthly users in its first 100 days and CityVille grew to 61 million monthly usersin its first 50 days.

Image representing FarmVille as depicted in Cr...

The process… 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.

For the techies… 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.

Zynga and Facebook

As Facebook touches 800m users, it’s a key part of Zynga’s strategy. Zynga derives most of its revenue and players through Facebook.


Facebook aggregates the users and provides the commerce engine.

In July 2010, Zynga began migrating to Facebook Credits as the primary payment method for games played through Facebook, and by April 2011, we had completed this migration. Facebook remits to Zynga an amount equal to 70% of the face value of Facebook Credits purchased by players for use in games played through Facebook. Zynga record bookings and recognize revenue net of the amounts retained by Facebook.

The close relationship between Zynga and Facebook is described in this article by AllThingsD. Zynga has disclosed details of its very close partnership with Facebook as part of a 600-page-plus update.  The language of one clause reads: “[T]he Facebook Platform will be integrated into the Zynga Mobile Games and Zynga Properties and FB will be the sole and exclusive Social Platform …” Zynga has apparently committed exclusivity to Facebook for a certain list of covered games.

I would venture out to say that Facebook is truly the next generation consumer Cloud Platform, the likes of which we have never seen before.  I will dive into the Facebook Cloud in another article.

Value of Hybrid Cloud Strategy

The value of Zynga’s hybrid cloud strategy is efficiency and focus:  with an “on-demand” model, Zynga can minimize capital outlay (CapEx spend) by not having to invest in more resources than necessary upfront, nor does it have to worry about underprovisioning resources or otherwise inadequately configuring them when it brings games onto its private cloud.

Private clouds can cost less than public clouds for applications with fairly stable usage patterns, and they help companies meet various requirements around security and compliance.


Zynga presents a classic migration path most fast growing firms follow.  Start with a dedicated hosted IT infrastructure, but as business growth quickly outpaced its ability to add infrastructure move to Amazon Web Services (EC2).

English: Zyngalogo

Having survived the torrid growth phase, and gained a better understanding of workloads in the process, firms like Zynga then build their own internal cloud to compliment the Amazon EC2 footprint.

What is interesting is the complexity that needs to be managed?  Zynga’s IT team is managing all four models shown below in parallel.  Private Cloud with;  IaaS with Amazon EC2,  PaaS with FaceBook;  SaaS with Facebook Credits.

This ability to shift and surf models flexibly is the hallmark of next generation IT.

Notes and References

  1. See for more on Cloudstack architecture
  2. Meet ZCloud —
  3. See Zynga’s S-1 Filing for details on the business model.  Some facts from the S-1
    • 232 million average users per month in 166 countries.
    • It has developed seven of the top 10 games on Facebook.
    • Five new players join Zynga every second.
    • Ten percent of the world’s Internet population plays Zynga games every month.
    • Cityville went from 0 to 100m users in 40 days.
    • If Farmville were a country, it would be fifth largest in the world.
    • One in five Americans play social games.

Social Gaming Industry Background [from Zynga’s S-1]

The way people use, communicate through and socialize on the Internet continues to evolve. A major shift in people’s use of the Internet is the increased popularity of playing games relative to other online activities. According to a Nielsen report in August 2010, the time spent playing online games in the United States surpassed the time spent on email. There are a number of key trends that will continue to drive the growth and popularity of social games, including:

Growth of Social NetworksOver the past decade, social networks have emerged as mainstream platforms that enable people to connect with each other online, share information and enjoy experiences with their friends and families. In 2010, there were approximately 1.0 billion users of social networks globally according to IDC, a market research firm, including over 500 million active users on Facebook. IDC forecasts that the number of users on social networks globally will grow to 1.6 billion by 2014.

Emergence of the App Economy. In order to provide users with a wider range of engaging experiences, social networks and mobile operating systems have opened their platforms to developers, transforming the creation, distribution and consumption of digital content. We refer to this as the “App Economy.” In the App Economy, developers can create applications accessing unique features of the platforms, distribute applications digitally to a broad audience and regularly update existing applications. Social networking sites and mobile application stores have become mass market consumer destinations where content is easy to find, immediately accessible and always available. Growth in the number and quality of applications has driven further increases in social network and mobile usage.

Social graph and viral distribution. At the core of social networks is the social graph, a digital mapping of a social network user’s real-world connections that can be used to promote social interaction and sharing among the users. By leveraging the social graph, high quality social applications that deliver compelling value for social network users and have mass appeal can achieve significant levels of adoption rapidly via viral growth.

Proliferation of mobile. There is significant demand for applications on mobile platforms such as Apple iOS and Google Android. As smart phones, tablets and other increasingly powerful connected devices have proliferated worldwide, application developers have leveraged the much greater distribution opportunity and emerging social connectivity of mobile devices. Games are the most popular category of applications on smartphones, representing approximately half of the time spent on smartphone applications in the United States, according to a May 2011 report by Flurry Analytics, a market data and analytics firm.

Rapid Growth of Free-to-Play Games. Most social games are free to play and generate revenue through the in-game sale of virtual goods. According to In-Stat, a market intelligence firm, the worldwide market for the sale of virtual goods was $7.3 billion in 2010 and is expected to more than double by 2014. Compared to pay-to-play business models, the free-to-play approach tends to attract a wider audience of players, thereby increasing the number of players who have the potential to become paying users. By attracting a larger audience, the free-to-play model also enables a higher degree of in-game social interaction, which enhances the game experience for all players.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments


Get every new post delivered to your Inbox.

%d bloggers like this: