How Hard Rock Digital built a highly available and compliant sports betting app

How Hard Rock Digital built a highly available and compliant sports betting app

Hard Rock, anytime, anywhere:

Scaling a performant, compliant and entertaining experience

View the case study

In 2020, Hard Rock International (HRI) and Seminole Gaming (SGA) launched Hard Rock Digital and tasked that organization with developing an application for sports betting. Hard Rock Digital has the ability to leverage data from HRI and SGA’s combined database of more than 130 million customers and their ~250 land-based venue (across 76 countries); to build the application.

There are two primary challenges:

  1. Compliance. Gambling is one of, if not the, most regulated industry in the world. Their application would need to allow users to travel between states and place wagers while keeping Hard Rock Digital in compliance with federal legislation.
  2. Availability. The platform needs to be available 24/7, performant, and consistent in order to properly support a high volume of concurrent users hitting the application from all over the world at a wide variety of times. Including huge spikes in traffic for major sporting events. 
RELATED Download Hard Rock Digital's case study (PDF)

This application has become a reality in part because Hard Rock Digital built Sportsbook on CockroachDB. 

Watch this short video of Hard Rock Digital database engineer, James Lupolt, explaining his experience building with CockroachDB:

Sports betting application data compliance 

Sports betting in the United States must comply with The Federal Wire Act (1961) which requires that betting data must be processed within the state lines in which the bet was placed. Hard Rock Digital needed to build a compliant, multi-region application to service users in different locations. In order to do so, HRD needed a distributed database that could help them keep data within state boundaries and eliminate the need for frequent performance, downtime, and operational issues. 

The infrastructure team at Hard Rock Digital had experience with PostgreSQL and happily uses it for other applications. But it was not the right solution for a complex, performant sportsbook app that needs to run across multiple regions.

Hard Rock Digital needed a database that could meet the following requirements:

  • High availability & eliminate risk of downtime/outages
  • Ability to pin data to a location to help comply 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) 

In the opinion of the team at Hard Rock Digital, there was only one database that could deliver on all their requirements: CockroachDB. CockroachDB is architected to deliver the flexibility, stability, consistency, and performance that Hard Rock Digital needs to support a multi-region application with users spread out 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 Giles, SVP & Head of Technology

Sportsbook application architecture

The foundation of Hard Rock Digital’s sportsbook application is derived from an existing application that is Java based and written for Postgres. Hard Rock Digital is an AWS customer and wanted to run the app on AWS Outposts so that the infrastructure for each state they support would physically be running in that state.

To meet compliance regulations a CockroachDB gateway node is placed in each state where Hard Rock Digital offers its service. Because CockroachDB functions as a single logical database, the application can 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, the application has strict high availability (HA) requirements. The app needs to be able to survive the loss of a single Outpost or AWS availability zone (AZ) so that it would never lose data in the event of one of those outages. 

The application is running CockroachDB across AWS Outposts and AWS US-East-1. 

Sports betting application diagram

Because CockroachDB provides simple, horizontal scale, it can handle a rush of transactions from high-demand events, like the World Cup, without performance slowing down. Also, because CockroachDB has online upgrades and online schema changes, there is less operational burden to deal with, which frees up the team to 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 Giles, SVP & Head of Technology

More sports betting application architecture details

Less than a year after the initial launch, Sportsbook is available in Iowa, Arizona, New Jersey, Tennessee, Indiana, and Virginia. The application will be available in 2 more states (Ohio & Illinois) by the end of 2022. By 2024 Hard Rock Digital expects Sportsbook to be a top 3 sports betting app.

As of today’s publish date there aren’t any other sports betting applications that allow for users to move from state to state and place wagers with the guarantee that their business will comply with The Wire Act. If you want to learn more about the topology pattern that Hard Rock Digital created to help them achieve this compliance you can check out the full Hard Rock Digital case study or you can watch this presentation of James Lupolt, database engineer at Hard Rock Digital, on stage at our first ever CockroachDB customer conference. In this talk he focuses primarily on hitting performance goals, dealing with bursty traffic, data domiciling for the federal and state regulations for gambling:

About the author

Cassie McAllister linkedin link

Cassie is a Senior Product Marketing Manager at Cockroach Labs. Her focus is on vertical marketing and telling customer stories. She's been in the database world for the past 5 years and previously worked in communications for cybersecurity companies. In her free time, you can find her at the beach, sipping wine, or skiing down a mountain.

Keep Reading

Intro to multi-region distributed SQL topologies

CockroachDB is a Distributed SQL database. That means for the person doing the querying, everything looks like …

Read more
How Form3 is building unkillable payment infrastructure

What do you do when you need the speed of a NoSQL database and the consistency of a relational database at the same …

Read more
Brazil's Nubank uses CockroachDB for application resiliency and scale

Nubank, a leading Brazilian financial technology company valued at more than $45 billion dollars, needed a scalable SQL …

Read more