Technical dive to how gaming companies use AWS to make sure they can deliver faster and better games to their users. We will talk about game studios like Rovio, Ubisoft, EA, Supercell, Zynga.
5. Zynga games and data centers
Zynga Poker, Mafia Wars, and the X-Wars games
were hosted in retail data centers in Silicon Valley.
We did just about everything:
• Equipment purchasing
• Racking and stacking
• Networking
• Operations and maintenance
6. Rapid growth with finite capacity
• We outgrew our data centers
• Lead times on equipment created a constant state of stress
• Bigger games actually cannibalized equipment from lower
performing games
7. FarmVille and the AWS cloud to the rescue
• FarmVille launched in AWS in June 2009 as our first Amazon EC2 game
• A few months later, it crossed the 80 million monthly active user mark
• In the summer of 2009, it would not have been possible for us to acquire
enough hardware for this meteoric growth, let alone provision it or even fit it in
our data center footprint
8. Zynga and AWS from 2009–2011
• Zynga continued to launch and scale
massive games on Facebook running
on top of AWS:
• Café World, CityVille, FrontierVille,
ChefVille, Bubble Safari, and more
• These games each rocketed from 0 to 10 million
users in weeks
• Zynga became extremely good at scaling in the cloud
• Our games like Zynga Poker, Words With Friends, and
even Mafia Wars launched on mobile platforms
9. zCloud: a cloud of our own
• Our appetite for EC2 instances and storage grew
• In partnership with AWS, we worked hard to keep up
• It wasn’t enough – we were consuming 10s of thousands of instances
and needed more
• With games like FarmVille and CityVille at scale and with more on the
way, we created our own cloud with plans of operating in a hybrid model
10. zCloud worked
• For major work loads, our new equipment
and dual network configuration gave us
nearly 3x gains in efficiency
• Our analytics infrastructure was able to
scale to new heights
• We were able to run both virtual instances
and bare metal as needed
• Time passed, equipment aged, and
mobile was upon us
11. Changing times
• Over the past few years, our industry and our games have moved to
mobile
• Our tech teams have created scalable, multi-tenant game services that
require a lot less equipment
• AWS invests heavily in scale, performance, configuration options, and
managed services
• We are investing in creating great games and can leverage the scale of
AWS and their learnings since 2011
12. Analytics breaks new ground in AWS
• Zynga stores and analyzes petabytes of data
• The equipment in our first zCloud data center was aging
• We chose to exit that data center and attempt to run our infrastructure in
the cloud
• No one had done this at our scale before
• We conducted 3 PoCs with AWS
• A fourth try that AWS conducted finally showed the way
• In 12 months, AWS has advanced storage and compute three times
• Had we chosen our own infrastructure, we would be behind already
13. Games and game services
• On a case-by-case basis, we consider workloads, future growth, and expense
• In some cases, we have completely re-implemented systems behind an API using
AWS managed services, while others have been lift and shift migrations
• The flexibility in options (instance classes, managed services, storage, etc.) has
given us the ability to experiment with live workloads running in parallel to choose
the best option
14. With Friends paves the way
• Words With Friends is our largest game – mobile and web
• It runs on iOS, Android, Windows, Kindle, and Facebook
• It is powered by a multi-tenant, turn-based backend
• The same backend powers Hanging With Friends, Word
Streak, Matching With Friends, Gems With Friends,
Chess With Friends, and What’s the Phrase
• We took a conservative, lift and shift approach to move
the backend
15. With Friends paves the way
• The move went smoothly with zero player downtime
• Post-migration, we were able to reduce the overall size by
over 30%
• Updated to AWS Linux image
• Upgraded Memcache to newer version
• Took advantage of I2 and local SSD
• These updates have shown the path for how to treat
many of our other games and services post-migration
16. Some key victories
• For With Friends, we re-implemented our Community Matchmaking:
• Reduced 100 database servers to 3 in AWS
• Updating to AWS Linux allowed us to drop our application server
instances from ~300 to ~200 due to the enhanced networking
capabilities
• Zynga Poker replaced a large MySQL farm with Amazon DynamoDB
dramatically reducing operational overhead
• A separate Zynga Poker database cluster saw 30 – 40X improvement in
query performance even under full write load:
• Query 1 went from 38 seconds to 1 second
• Query 2 went from 26.7 seconds to 1.5 seconds
17. Three reasons to consider a public cloud
• Business focus
• Zynga can focus on technical innovation in our games
• Investment
• With AWS, we pay for what we use, nothing more
• A three-year CapEx commitment means you are committed to what you
buy now vs. what is state of the art in one, two, and three years
• People
• Less emphasis for people to have hardware and physical infrastructure
expertise
• We can focus our people on running and operating our applications
18. “There’s a lot of places that are not strategic for us to have
scale and we think not appropriate, like running our own
data centers. We’re going to let Amazon do that.”
Mark Pincus, CEO, Zynga
33. PARTNERSHIPS, NOT CONTRACTS
AWS GAMING
Old World
Proprietary
Very expensive
Punitive licensing inhibits change
Limited flexibility
New World
Open-source
Cloud economics
Come and go as you please
Build on top of existing standards
“Aurora has been nothing short of impressive. While our workload is fairly modest – the busiest
instance is an r3.2xl handling ~9k selects/second during peak for a 150 GB data set – we love that so
far Aurora has delivered the necessary performance without any of the operational overhead of running
MySQL.” Chris Broglie Architect (Zynga)
36. Traditional: Rigid AWS: Elastic
Servers
Demand
Capacity
Excess Capacity
Wasted $$
Demand
Unmet Demand
Upset Players
Missed Revenue :(
SCALE TO WHAT YOU NEED – PAY FOR WHAT YOU USE
AWS GAMING
37. Planning Dev/Test Retention & Monetize
Next
Launch
Before Launch Launch After Launch
Users
Try & Error
CBT
(Closed Beta)
Performance
Test
Marketing
(Free to Play)
Daily Reward
In-app
Purchase
Appstore
Featuring
Push Notification
Store Design
Next Season
Launch
Time
Acquisition
MATCHES PRETTY CLOSE TO A GAME LAUNCH CYCLE
AWS GAMING
39. AWS Global Infrastructure
Regions
• Geographic locations
• Consist of at least two Availability Zones
Availability Zones
• Clusters of data centers
• Isolated from failures in other Availability Zones
40. Example AWS Region
AZ
AZ
AZ AZ AZ
Transit
Transit
• 1 of 19 AWS world-wide AWS regions
• Redundant paths to transit centers
• Transit centers connect to:
– Private links to other AWS regions
– Private links to AWS Direct Connect
customers
– Internet through peering & paid transit
• Metro-area DWDM links between AZs
• AZs <2ms apart & usually <1ms
41. COMMON GAME BACKEND CONCEPTS
AWS GAMING
• Think in terms of APIs
• HTTP + JSON
• Get friends, leaderboard
• Binary asset data
• Multiplayer servers
• High availability
• Scalability
https://aws.amazon.com/ko/solutions/case-studies/devsist
42. ELB
• Choose region
• >=2 Availability Zones
• Amazon EC2 for app
• Elastic Load Balancing
• Amazon RDS database
• Multi-AZ
Region
EC2 EC2
AWS GAMING
CORE (HA) GAME BACKEND
44. AWS GAMING
AMAZON S3
Secure, durable, highly-scalable object storage.
Store and retrieve any amount of data from anywhere on the web
“With AWS, we have tremendous flexibility, and we never get into
a situation where there is something we can’t do.”
“The flexibility of the AWS Cloud allows us to do things
that we otherwise couldn’t do,”
46. AWS GAMING
AMAZON CLOUDFRONT
Global CDN that accelerates delivery of your DLC,
Update Patches,APIs, video content or other files.
Sega didn't provide us a quote, but they do use CloudFront
and they would have said some very nice things in this
quote. You have to trust us on this!
“By combining the power of AWS compute & storage with the
Amazon CloudFront content delivery network, we can provide an
excellent user experience to everybody playing our games &
watching our video content—regardless of their geographical
location,”
47. EC2 EC2
ELB
Region
EC2 EC2
CloudFront
CDN
AWS GAMING
SCALE IT WAY OUT
• Amazon S3 for game data
• Assets
• UGC
• Analytics
• ... with CloudFront!
• Auto Scaling Group
• Capacity on demand
• Respond to users
• Automatic healing
48. ELB
Region
EC2 EC2
CloudFront
CDN
AWS GAMING
SCALE IT WAY OUT
• Amazon S3 for game data
• Assets
• UGC
• Analytics
• ... with CloudFront!
• Auto Scaling Group
• Capacity on demand
• Respond to users
• Automatic healing
• Amazon ElastiCache
• Memcached & Redis
49. ELB
Region
EC2 EC2
CloudFront
CDN
• Games are write heavy
• Caching of limited use
• Key value key value
• Binary structures
• Database = bottleneck
WRITING IS PAINFUL
AWS GAMING
51. AMAZON DYNAMODB
AWS GAMING
Fully managed NoSQL database
with single digit latency at any scale
“Using Amazon DynamoDB frees us from building,
maintaining, & sharding large real-
time data intensive projects.”
By using AWS, Frontier Games can scale compute resources
easily to handle large spikes in user traffic with popular titles, and
is saving up to 30 percent compared to using a traditional
technology infrastructure,
53. OR DITCH SERVERS ALTOGETHER - LAMBDA
AWS GAMING
Continuous
scaling
No servers to
manage
Never pay for
idle – no cold
servers (only
happy
accountants)
54. Run code without servers. Pay only for the compute time you consume.
Triggered by events or called from APIs:
• PUT to an Amazon S3 bucket
• Updates to Amazon DynamoDB table
• Call to an Amazon API Gateway endpoint
• Mobile app back-end call
• And many more…
Makes it easy to:
• Perform real-time data processing
• Build scalable back-end services
• Glue and choreograph systems
AWS LAMBDA – SERVERLESS COMPUTING
AWS GAMING
55. Bring your own code
Node.js, Java, Python, C#, Go
Bring your own libraries (even
native ones)
Simple resource model
• Select power rating from 128
MB to 3 GB
• CPU and network allocated
proportionately
• Reports actual usage
Programming model
• AWS SDK built in (Python
and Node.js)
• Lambda is the “webserver”
• Use processes, threads,
/tmp, sockets normally
Stateless
• Persist data using Amazon
DynamoDB, S3, or Amazon
ElastiCache
• No affinity to infrastructure
(can’t “log in to the box”)
LAMBDA PROGRAMMING MODEL
AWS GAMING
56. DON’T FORGET TO CAPITALIZE ON THESE TRENDS
① Big Data & Machine Learning for Player Retention & Monetization
② E-Sports
③ Cloud Connected Game Engines
AWS GAMING
64. DON’T FORGET TO CAPITALIZE ON THESE TRENDS
① Big Data & Machine Learning for Player Retention & Monetization
② E-Sports
③ Cloud Connected Game Engines
AWS GAMING
65. THE RISE OF E-SPORTS
• In 2017, the global eSports market was valued at nearly 493 million U.S. dollars.
According to the estimates, global eSports market revenue will reach 1.65 billion
U.S. dollars in 2020. We saw many prominent gaming companies launch eSport
divisions to address the market
AWS GAMING
66. TWITCH - CREATE A FAN BASE!
AWS GAMING
15M daily active users
2.2-3.2M broadcasters / month
355B minutes watched / month
124M+ total clips
95 min per day on average
• Leading Social Video Platform for Gamers
• Helps to build strong communities for your
game
• Leverage entertaining players to spread
adoption
Is this game worth getting?
How do I get better at this game?
68. DON’T FORGET TO CAPITALIZE ON THESE TRENDS
① Big Data & Machine Learning for Player Retention & Monetization
② E-Sports
③ Cloud Connected Game Engines
AWS GAMING
70. • Built based on the successful
CryEngine
• Systems by Double Helix
Games
• Cloud backend can be
powered by AWS
• Full integration with Twitch
• It’s free to use!
AWS GAMING
71. PC PlayStation 4,
Xbox One
Android,
iOS
Virtual
Reality
AMAZON LUMBERYARD SUPPORTED PLATFORMS
AWS GAMING
72. • IDE that allows live
Visual Editing
• Provides “Gems” for modular
development
• Designers for 2D & UI interfaces
• Entity & Component framework
• Visual scripting via Flow Graph
AMAZON LUMBERYARD EDITOR
AWS GAMING