But it continued to build out its zCloud, using software from Cloud.com and management tools from RightScale.
In the past year it has significantly expanded its own data-center capacity. Leinwand wouldn't give specifics, but he said the company has multiple physical locations on the East and West Coasts to provide redundancy.
It added enough power capacity to zCloud in the second half of 2011 to power "166 versions of the International Space Station," he said.
To improve reliability, Zynga set up its own fiber connections into Amazon and Facebook. The big outage Amazon suffered last year was a wake-up call for the company.
"Even though our game services weren't necessarily materially affected by that outage, knowing that someone we had a dependency on could have an outage changed the way we built the infrastructure," Leinwand said.
It built its own tools to help understand how its CPU, memory and I/O usage are constrained by its gaming applications, and what most stressed its Web servers, memory cache and storage systems.
The upshot of that optimization work is that for every three physical servers Zynga had to rent from Amazon, it now needs only one in zCloud.
"Its not because AWS has bad servers or is a bad service, it's because we streamlined, optimized and tweaked the zCloud platform in a way that was relevant for social games."
Zynga uses a three-tier system. When a person plays "Chess with Friends," for instance, the user enters the game through its Web servers, changes to the board are cached in memory, and the game is saved on multiple disks for redundancy.
Its apps are written mostly in PHP. It uses an open-source platform called Membase, which has memecache on the front end and a no-SQL database on the back end.
It had used MySQL for storage, but doesn't need its sophisticated query capabilities, and using Membase for both memory and storage gives it one less layer to administer.
Leinwand's team wrote automation tools that allow Zynga to install a thousand servers in short order. It doesn't use containers, like Microsoft and some other big online firms, but its integrator partners deliver the servers racked and ready to roll in.
It worked with a partner to design one server for a specific application -- Leinwand wouldn't describe it in detail -- but in general it uses standard x86 hardware where possible.
"As a philosophy I like to leverage what I call Taiwan Inc.," he said.