[CASE STUDY]
STATES & REGIONS
NODES AT PEAK PERIODS
SINGLE LOGICAL DATABASE
Prior to releasing Hard Rock Bet into the wild, the Hard Rock Digital team had to navigate many regulatory requirements. In particular, 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. In some cases, there are even stricter regulations around data residency in which the data has to reside not only in a particular state, but a particular building in a particular city.
The team wanted to avoid the approach that a lot of traditional sports betting operators take by doing multi-state deployments which means creating an independent silo in each state. This approach creates challenges when it comes to reporting since you have to aggregate the data from each of the different databases. It also adds additional overhead of setting up a trading system from scratch which would have slowed down their time to market. And, it hinders the customer experience because they would be required to sign up independently in each state.
Hard Rock Digital wanted to deliver a seamless experience for their customers that was still compliant with federal, state, and local regulation and legislation. The team 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 meet 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.
Compared to other distributed SQL databases, we liked the seamless nature of CockroachDB. We didn’t have to do anything complicated at the application layer. There wasn’t a lot of troubleshooting replication. There’s no single writer that could become a bottleneck. And, we can place it wherever we want, which is not possible with a lot of other databases.
-James Lupolt,Senior Database Administrator, Hard Rock Digital
Hard Rock Digital’s betting platform foundation comes from an application that is Java based and written for Postgres. CockroachDB is Postgres-compatible and presents itself like a SQL database, but in reality, it's a series of connected nodes that make up a distributed SQL database which allows you to scale across multiple geographical regions.
In order to meet compliance regulations, they need to have a database gateway node in each state. Since they are AWS customers, Hard Rock Digital wanted to leverage the ability to run on a combination of AWS Regions, AWS Local Zones, and on AWS Outposts.This way the infrastructure for each state they support would physically be running in that state.
Because CockroachDB functions as a single logical database, the application could talk to nodes in each respective state. CockroachDB can also extend across a hybrid infrastructure. If there’s an AWS region available in the jurisdiction that they are operating, they will go with that choice. If there’s not one available, they will use an AWS Local Zone. And if they can’t use that, they will use an AWS Outpost.
The visualization below depicts how a state deployment works. On the left hand you can see the AWS Control Plane, and on the right hand side there’s an on-premise deployment which changes based on which state they are running (it could be a region, local zone, or Outpost).
Below is a snapshot of where they are running CockroachDB as of early 2025. They have deployments set up in the states Hard Rock Bet is currently available in including Arizona, Indiana, Tennessee, Florida, Ohio, Illinois, New Jersey, 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. Not only is Hard Rock Digital able to easily add more nodes to scale up, but they also have the capability to scale back down.
For example, during NFL peak season, they run around 100 database notes with 32 vCPUs each. Once the NFL season is over, they will scale back down to about a third of that capacity by decommissioning a list of nodes that they don’t need anymore. CockroachDB automatically moves the replicas onto other nodes, and the team terminates the EC2 instances. There’s no downtime or interruption to service.
There’s also no downtime for upgrades or schema changes. CockroachDB eases the operations of a single database cluster with online upgrades, and online schema changes, which ultimately helps the team focus on improving the application instead of maintaining the database.
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.
With CockroachDB, we’ve survived some pretty interesting failure scenarios. Nodes crash-looping, loss of a single state, EC2 instances that wouldn’t start. In these situations, there was no noticeable impact to availability or performance. We’ve never had an unrecoverable outage where data was permanently unavailable or needed to be restored from backup which is probably the number one thing people worry about.
-James Lupolt, Senior Database Administrator, Hard Rock Digital
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 Bet 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, they 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 Giles,SVP & Head of Technology, Hard Rock Digital
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. Hard Rock Bet has had tremendous success over the past few years, 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.
When it comes to TCO, we are saving a tremendous amount of money and manpower 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 Giles, SVP & Head of Technology, Hard Rock Digital
Spin up your first cluster in minutes. Start with $400 in free credits.