[CASE STUDY]
[ INDUSTRY ]
How Hard Rock Digital is using CockroachDB to become a top sports betting and interactive gaming platform
[ CHALLENGE ]
Building a complex, performant sportsbook app that could run across multiple regions
[ SOLUTION ]
A multi-region betting app built on CockroachDB that delivers flexibility, stability, consistency, and performance required
STATES & REGIONS
TRANSACTIONS PER SECOND
NODES
Prior to releasing Hard Rock Sportsbook into the wild, the Hard Rock Digital team had to navigate many challenges. Sports betting in the U.S. must comply with The Wire Act legislation that mandates that betting data must be processed within the state lines in which the bet was placed. They needed to build a compliant, multi-region application which required the help of a distributed database that eliminated the need for frequent performance, downtime, and operational issues.
The team at Hard Rock Digital had experience with PostgreSQL and happily uses it for other applications. However, they knew that it wasn’t going to be the right solution for a complex, performant sportsbook app that needed to run across multiple regions.
Hard Rock Digital needed a database that would deliver:
High availability & eliminate risk of downtime/outages
Ability to pin data to a location to help aid with state & federal regulations
A centralized, shared location for data
Ability to scale horizontally to support hundreds of thousands of concurrent users
Guaranteed consistency for a high volume of transactions
Automated tasks to reduce operations
Ability to scale across regions and environments (on-premise & cloud)
There was only one database on the market that could deliver on all their requirements: CockroachDB. CockroachDB would deliver the flexibility, stability, consistency, and performance Hard Rock Digital needed to support a multi-region application with users across the United States.
This is the first time I’ve been excited about a database. Right out of the box, CockroachDB solves a lot of challenges for us as a national sportsbook.
-Mick GilesSVP & Head of Technology
Hard Rock Digital’s betting platform foundation comes from an application that is Java based and written for Postgres. They are AWS customers and wanted to run on AWS Outposts so that the infrastructure for each state they support would physically be running in that state.
In order to meet compliance regulations, they would have a database gateway node in each state. Because CockroachDB functions as a single logical database, the application could talk to nodes in each respective state. CockroachDB can extend across a hybrid infrastructure (i.e. AWS cloud regions and Outposts servers) and is Postgres-wire compatible.
Given the nature of a sports betting application, Hard Rock Digital also had stringent high availability (HA) requirements and needed to be able to survive the loss of a single Outpost or AWS availability zone (AZ) so that they would never lose data. With CockroachDB, you can customize your survival goals to fit your use case.
They are running CockroachDB across AWS Outposts and AWS US-East-1. They have deployments set up in the states Sportsbook is currently available in including Arizona, Indiana, Tennessee and Virginia.
Because CockroachDB provides simple, horizontal scale, it can handle the influx of transactions from high-demand events like the Super Bowl without taking a hit to performance. And the ease of operations of a single database cluster with online upgrades, and online schema changes helps the team focus on improving the application instead of maintaining the database.
When it comes to TCO, we are saving a tremendous amount of money and resources by using CockroachDB. It takes care of all the heavy lifting for our team, and allows us to focus on aggressively entering new markets and reaching our goals.
-Mick GilesSVP & Head of Technology
Hard Rock Digital has heterogeneous workloads running on CockroachDB which includes data generated from many use cases including placing bets, settling bets, user account management, cache-loading on app startup, and importing metadata on a huge number of sports events.
Because Hard Rock Sportsbook is a multi-region betting application deployed on-prem and in the cloud, the Hard Rock Digital team had to create a topology pattern that would support different localities and use cases.
CockroachDB uses the Raft consensus protocol. In CockroachDB, when a range receives a write, a quorum of nodes containing replicas of the range acknowledge the write. This means data is safely stored and a majority of nodes agree on the database's current state, even if some of the nodes are offline.
Whenever an application runs across multiple geographies, it's important to deploy clusters across regions properly and carefully choose the right survival goal for each database (as discussed above), and table locality for each table. In the case of Hard Rock Digital, it did a thorough analysis to determine the best topology and customized locality for each state.
While a complicated process, the Cockroach Labs team helps customers with setup and provides support as businesses expand and grow into new regions.
We’ve been so impressed with the Cockroach Labs team and the support they’ve delivered. They helped us set up the environment we required for our complicated, specific use case and have been here to guide us every step of the way.
-Mick GilesSVP & Head of Technology
Hard Rock Digital’s goal remains the same: to build the best products in the market and deliver an online Hard Rock experience to its fans anytime, anywhere. Less than a year after launching in its first state, Hard Rock Sportsbook’s mobile app is available in Arizona, Indiana, Tennessee and Virginia with plans to launch in Ohio and additional states in the near future, providing its players with integrated experiences online and at its local entertainment properties.
The use of CockroachDB coupled with a premier tech stack built by a talented team and a ‘fight to win’ mentality, has Hard Rock Sportsbook well prepared to continue to scale rapidly and continue to entertain its players like no one else can.
Spin up your first cluster in minutes. Start with $400 in free credits.