Where are you using WebAssembly?
Wasm promises to let developers build once and run anywhere. Are you using it yet?
At work, for production apps
At work, but not for production apps
I don’t use WebAssembly but expect to when the technology matures
I have no plans to use WebAssembly
No plans and I get mad whenever I see the buzzword
Data / Frontend Development / Open Source

A Real-Time Data Platform for Player-Driven Game Experiences

How Fortis Games is building a data platform focused on self-service using Redpanda, Flink, ClickHouse and Iceberg.
Jul 31st, 2023 6:34am by
Featued image for: A Real-Time Data Platform for Player-Driven Game Experiences
Image via Shutterstock.

At Fortis Games, we create new mobile, PC and console games where players belong and that challenge players, build connections and inspire communities. To deliver that experience, we personalize player experiences by tapping into real-time game data — and this requires us to have a scalable, flexible, fast and developer-friendly data infrastructure.

Our data team is highly seasoned and have worked on AAA blockbuster games, supporting data pipelines built on the likes of Apache Kafka and Confluent. When we came to Fortis, we opted to build our fresh new real-time data infrastructure on Redpanda, a streaming data platform that gives us Kafka compatibility but without the usual pains of Kafka management.

In this post, we’ll provide a look at how our data team designed a games data platform that provides everything our developers need to create games where players belong, without our developers having to know a thing about the backend infrastructure.

The Key Components of a Next-Generation Games Data Platform

Fortis builds games for many different platforms and play styles, so first we wanted to create a data platform that was “game agnostic” and could support any new game in development, regardless of the data needs. This goes against the grain of the traditional approach in the games industry, where each game or studio within a publisher might have its own tailored data infrastructure.

In our experience, that kind of siloed approach slows things down, because game developers within the same publisher have to work with different data teams and different pipelines to get what they need to improve gameplay experience. As a player-first company, we can’t afford those kinds of high latencies in gamer satisfaction.

We also needed our data platform to be self-service for game developers so they can plug directly into the stack using data formats and protocols that they’re already familiar with. We don’t want our game developers to even have to pronounce “Kafka,” let alone have to think about how it works: A developer should be able to easily send freeform JSON to the platform, where it can be pushed downstream for real-time analytics and dashboards, or used in event-driven applications such as leaderboards.

For example, the developer might want to create real-time dashboards to understand contextual information about players — items they accumulated, areas of the map they tend to hang out in, the accuracy they have with various weapons, etc. — so they can make smarter decisions that improve the game.

Factors such as engagement rates on new game elements, the impact of new patches and whether certain weapons are overpowered can all be rapidly incorporated into game development, which helps Fortis keep its player base happy.

Our Real-Time Data Architecture

To support these requirements, we built a highly scalable, flexible, high-performance and easy-to-use data platform using Redpanda.

Here’s how it works. Our developers use an analytics SDK we provide, which enables them to send game telemetry of any kind to a REST fleet of servers that can accept HTTP POST. This uniform data about game events is loosely verified (What game is it? Timestamp? Event name? Player ID? etc.) and then immediately sent to Redpanda with a linger time of less than 100 milliseconds.

The data streams in Redpanda are processed in real time using Apache Flink and written to a ClickHouse data warehouse for online data analytics. ClickHouse allows us to store all data from all games in a landing table where we can run game-specific and event-specific lookups that are insanely fast.

The real-time data is also sent to a data lake using Apache Iceberg, where it can be analyzed using Spark jobs, custom Flink jobs and big SQL queries, such as for eight-month aggregations of events.

Fortis Games’ real-time data architecture: Game events are sent to REST controller fleet, ingested into the Redpanda cluster and streamed to Iceberg, ClickHouse and other real-time systems

Redpanda provides the simplicity, scale and speed that forms the foundation of our real-time data infrastructure. We have tested the data platform for up to 100 million users with zero performance blips. And because it’s Kafka compatible, it “just works” with the great ecosystem tools we already love like Flink and Spark.

By combining Redpanda with other best-of-breed tools like ClickHouse and Iceberg, we have created a modern real-time analytics platform that can support our game developers today and many years into the future.

Why Redpanda?

So you may be thinking, this all sounds great, but why did you choose Redpanda for your streaming data engine when there are tried and tested tools like Apache Kafka out there? Let’s go through the reasons.

At Fortis Games, we’re building for the future of the games industry, and we want to use the best-of-breed solutions out there that can scale as our requirements grow and evolve. We don’t want to make compromises. We were impressed by how the Redpanda engineers obsessed about performance and stability, doing whatever they need to shave microseconds off a single CPU call.

As a data engineer, the design choices of Redpanda founder Alex Gallego resonated with me: a C++ and thread-per-core architecture that squeezes every drop of performance out of hardware, which makes all the difference for our p99s (not to mention reducing our infra bill); tiered cloud storage that enables us to retain data in the long term without performance loss; and a Raft-based consensus system that is easy to understand and helps us ensure zero data loss.

Second, we knew the pains of managing Apache Kafka and Confluent firsthand and wanted a solution that eliminated the administrative overhead generally associated with Kafka solutions. In other words, we didn’t want to tune a JVM (Java virtual machine) ever again!

I had suffered many sleepless nights at my previous game publisher, trying to get Kafka and Confluent to handle the scale of a million-person live service with 100GB/min throughput and peaks of 100K transactions per second. Inevitably, these solutions resulted in late-arriving data that could add up to seconds if not minutes, which was detrimental to the online systems I owned the service-level objectives (SLOs) for. No way was I going through that again.

Fortunately, Redpanda removes 90% of the headaches we get from Kafka because it’s so easy to deploy, manage and scale. As a single binary, it bypasses the external dependencies and components that make Kafka overly complex, like the JVM and ZooKeeper.

We don’t have to deal with any of those tiresome relics of Kafka’s 12-year-old design, like Linux page caching or garbage collection. Plus, Redpanda’s BYOC (bring your own cloud) deployment model gives us a fully managed service for cluster administration — including automatic upgrades, built-in connectors, and 24/7 support — while retaining full control over our data and infrastructure inside our own VPC (virtual private cloud).

Redpanda also translates to simplicity for our end users, the game developers. For example, because it uses Prometheus natively for monitoring, it’s simple for developers to scrape the data they need from the cluster without having to request custom data pulls via Slack.

I believe that data subsystems should act like a utility, and you shouldn’t have to think about brokers and partitions. You should just be able to put data in and know that it will work. Redpanda gives us that confidence — and it means I don’t get roused from my sleep or a night out with friends because something went wrong with a Kafka cluster.

A Data Platform for the Future

Fortis Games builds games that will redefine player-driven experiences, and a big part of how we deliver that is in how we leverage real-time data. That means our streaming data engine is a critical infrastructure asset.

Redpanda gives us a strong, reliable foundation to build a data platform for the future of games and players. It also does this while helping us to control costs as we scale. For example, Redpanda runs on approximately one-third of the compute resources as Kafka, which saves us infrastructure costs right out of the gate.

Its data sovereignty model lets us leverage our existing discounts with our cloud-service provider, something we can’t get from other Kafka vendors. All in all, it’s costing us about a quarter of what we would be paying with a standard Kafka solution due to its high-resource efficiency and flexible deployment options.

As a data engineer, I put a lot of stock into the hard work of other engineers who are building software that makes life easier for developers. Redpanda is just that type of software: It’s simple, it has a high-performance design that saves us time and money, and it’s extremely reliable at scale. We look forward to riding the real-time data waves to our next 100 million players and beyond.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Pragma, Real.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.