Leaf in the Wild: FACEIT Scales to 4m+ Gamers with MongoDB and Cloud Manager, Fuels Major New Partnerships with Industry Leaders

August 2, 2016

Computer gaming is one of the fastest growing industries on the planet. Revenues are expected to exceed $100bn for the first time this year, with games redefining how new generations of users consume and interact with media.

To be successful in this industry, companies need to rely on technology infrastructure that is agile, scalable and cloud-ready. That is why FACEIT, the world's leading competitive gaming platform, selected MongoDB.


I sat down with FACEIT CTO Maurizio Attisani, Systems Administrator & Service Delivery, to learn more about their journey from zero to over 4m users with MongoDB running in the cloud.

Can you start by telling us a little bit about your company?
We founded FACEIT in 2011. It has quickly become the leading platform for online competitions in Player versus Player (PvP) multiplayer games including League of Legends, Counter-Strike and DOTA 2. We have attracted over 4.3 million users since launch, and now every month host 2,000+ tournaments and manage 6 million game sessions. We also just partnered with Twitch, the video gaming platform, to create the world’s first professional eSports league that is offering teams co-ownership positions.

Please describe how you are using MongoDB
MongoDB is the main database underpinning our platform. We use it orchestrate services between players, teams, and competitions. All user profiles and tournament data is managed by MongoDB.

On average, each tournament match involves 10 players generating streams of time-series statistics, all of which are written to MongoDB. We use the data we collect in MongoDB to drive sophisticated analytics that track player behavior, engagement, and competitive performances in tools such as Mixpanel and Keen IO.

Why did you select MongoDB for your gaming platform?
We evaluated several different database options before making our technology choice. Our primary requirement was the management of user profiles. Each player could have one or more games registered to their profile, and we’d be constantly extending the schema with additional attributes as we added new games features, tournament types and gaming platforms to our service.

We quickly recognized that the static data model of relational databases would inhibit development agility in evolving our platform features. Also, the need to perform costly JOIN operations between player tables and game tables at run time would restrict future scalability.

As a result, we explored document databases that provided us with both a flexible schema and rich document data model. This capability enabled us to embed related data into a single user object that could be quickly accessed in just one call to the database.

We took a look at several options. But MongoDB was a long way ahead in terms of query functionality and performance, community vibrancy and ecosystem strength, coupled with the quality of its documentation and online tutorials. There was also broader availability of developer skills in the market, and options to run MongoDB as a managed service in the cloud. We recognized these attributes would help us to accelerate our time to market and deliver a better customer experience.

How did you get started with MongoDB?
We live by cloud-first principles here at FACEIT, so we initially chose to consume MongoDB as a service from the Compose platform. It was great to get started with, but we quickly outgrew it as users and traffic scaled. So we migrated to our own database instances hosted on AWS, and contracted a 3rd party MongoDB support provider to run the platform with its remote DBA services. But as our growth accelerated, it became clear that we needed more that just reactive troubleshooting to any issues we encountered.

To put our growth into perspective, in the first six months after launch, we went from 300,000 to 1m users, and then in the next 12 months, we scaled from 1m to 4m+ users. To sustain this growth, we needed proactive support and access to dedicated consultants to help optimize our schema and queries, especially for the streams of time series data the platform needed to manage.

So what did you do next?
What better way to support our growth than partnering directly with the company behind MongoDB! This gives us direct access to its architects, engineers, and consultants who have worked with thousands of other companies, and bring that aggregated expertise to optimize our environment.

We use MongoDB Professional for access to proactive support, and Cloud Manager Premium for operational automation and database monitoring. We also use MongoDB’s consulting services:

  • The Major Version Upgrade package enabled us to complete the migration from MongoDB 2.6 to the latest 3.2 release in under one week. Our services experienced no downtime at all during the migration, and the upgrade has resulted in a reduced database footprint with significantly lower costs.
  • The Performance Evaluation and Tuning package has been instrumental in helping us redesign our schema to improve experience for our gamers.

We also make extensive use of the courses provided by MongoDB University to accelerate the on-ramp for new developers coming into the company. The result is that they are productive and contributing new features to our service much faster.

Can you describe your current environment?
We are running MongoDB across two replica sets provisioned on AWS EC2. We use Cloud Manager to configure and deploy new instances, which is super easy and quick for our developers.

We use New Relic to provide global oversight across our application stack, and then Cloud Manager for MongoDB-specific low level telemetry. The monitoring data we get from Cloud Manager enables our developers to make more informed choices on query optimization. Its new visual query profiler makes it simple to identify slow running queries, and provides recommendations on how to address them.

Cloud Manager’s visual query profiler makes it fast to find and fix problem queries

Most of our apps are written in Java, and we also use Ruby for transformations of game statistics stored in MongoDB.

You mentioned you had upgraded to the latest MongoDB 3.2 release. How is that performing for you?
It’s going great!

How are you measuring the impact of MongoDB on your business?
MongoDB has been central to us scaling from zero to over 4m users in just 18 months. This growth has given us the capacity to scale our service to support new partnerships for FACEIT with Microsoft Xbox and Twitch.

Expanding to new platforms demonstrates the benefit of MongoDB’s flexible document model. Trying to add game-specific player IDs to existing user profiles without downtime or changes to the codebase when you are tied to a relational database is impossible. With MongoDB, we don’t give it a second thought. The database is flexible enough to adapt and grow as our business continues to expand.

What advice would you give someone who is considering using MongoDB for their next project?
MongoDB schema design is very straightforward – don’t be afraid to denormalize your data and optimize for the application’s query patterns. But also pay attention to future scaling needs – make sure you design your collections in such a way that it is easy to select a shard key when the time comes. The MongoDB documentation contains some good tutorials to help you on the right path.

Maurizio, thanks for taking the time to share your experiences with the MongoDB community.

Start your free trial of MongoDB Cloud Manager today


Previous Article
MongoDB Atlas as The Data Store for Apostrophe
MongoDB Atlas as The Data Store for Apostrophe

Apostrophe is a Content Management Systems that's designed to build content-driven web sites. Because of th...

Next Article
Building Modern Applications with Microservices: Part 1
Building Modern Applications with Microservices: Part 1

This is the first in a two post series about microservices. This post discusses the background behind micro...