Game Analytics Now Available in Real-Time
If you’re doing anything along the cutting edge on the Web these days, it’s in real-time. That means ceaseless client requests and server responses. It means constant reading and writing to databases. It means being able to scale quickly to handle traffic bursts, lest your users are left behind in the lag. For Playtomic, an analytics platform for more than 8,000 iOS, Android and Web-based games, this means upwards of 12,000 server requests every second. That’s right, requests per second, not minute or hour.
Playtomic works to help game developers figure out where and why players start to hate a game, identifying retention issues and locations that can help keep people playing for longer. It provides developers with customized player and game analytics, heatmaps that show in detail why players are unable to complete levels, dynamically-created leaderboards and more – all in real time and for every one of its thousands of games.
Better Performance and Easier Scaling
According to Playtomic co-founder and CEO Ben Lowry, Heroku has helped the company not only keep up with traffic spikes, but at a cost well below the competition.
“About 15 to 20 million people play games using Playtomic every day generating over a billion events,” says Lowry. “In the past our API was backed by a fleet of 8 dedicated servers running Windows and C#/ASP.NET, now we use Heroku and NodeJS which gives us better performance, easier scaling, and is much cheaper than our previous solution.”
Lowry says that Heroku solves a number of particular pain points, including:
- Easy deployment
- Fast diagnosis of issues
- Rapid scaling up or down
- Don’t have to worry about 100,000s of concurrent connections from people playing games we track
- Zero configuration
- Zero maintenance – we previously ran the software we run on Heroku across 16 ‘cloud’ servers, half just for load balancing
A traffic spike can come out of nowhere for Playtomic. If one of the more than 8,000 games that use Playtomic’s API to analyzed player behavior becomes popular, Playtomic can get hit hard. For example, when the Flash-based “Gum Drop Hop 3” recently hit the Web, it was an immediate hit, much like its predecessors.
Previously, Lowry says that scaling to handle traffic involved provisioning several virtual private servers. Each server meant an additional 30-minute set-up, a deploy time of anywhere from 10 minutes to a couple hours depending on what was being deployed, and then an additional 20 minute lag for DNS to catch up. By comparison, Lowry says that he uses 14 to 16 dynos on Heroku and “can double that in seconds by typing heroku scale web=32 into the Heroku terminal”.
Now, when a game like “Gum Drop Hop 3” goes viral, a single command line typed in seconds replaces hours of work.
Operating at Scale
When Lowry found himself discussing the benefits of running on Heroku over self-manage servers in a Hacker News thread, he perfectly summed up Heroku’s ability to simplify things when handling massive amounts of traffic and connections.
“Just over 20,000,000 people hit my API yesterday 700,749,252 times, playing the ~8,000 games my analytics platform is integrated in for a bit under 600 years in total play time. That’s just yesterday,” wrote Lowry. “There are lots of different bottlenecks waiting for people operating at scale. Heroku and Node.js, for my use case, eventually alleviated a whole bunch of them.”