A sports betting app saved millions switching from PostgreSQL to CockroachDB

A sports betting app saved millions switching from PostgreSQL to CockroachDB
[ Guides ]

1 Report. 7 Companies. Millions in savings.

Download Report

The challenges facing sports betting platforms are rigorous: they have to be fast and consistent in a way that’s similar to high-frequency trading platforms. At the same time, they have a variety of data-locality requirements to comply with depending on which states or countries they serve.

In this blog, we’ll look at a real-world example of a North America-based sports betting platform that designed a gaming and sports betting architecture that not only meets the performance, consistency, and compliance requirements of the industry; but also enabled the business to swiftly enter new regional markets without requiring a massive engineering effort.  

Data locality and The Wire Act

Sports betting services in the U.S. must comply with The Wire Act, which mandates that betting data must be processed within the geographical boundaries of the state in which the bet was placed. To build a multi-region online sportsbook that complied with The Wire Act regulations, this company planned to use AWS Outposts so that the infrastructure for each state where their betting platform operates would run physically within that state. 

This approach led to the larger challenge of finding a way to avoid operating a separate physical database in each state because running siloe’d databases adds both great expense and great complexity to application architecture. When thinking about the application complexity keep in mind that real-money gaming requires a real-time processing engine that can support millions of concurrent users who are placing bets at the same time which puts enormous pressure on the database.

How to meet compliance requirements in multiple states with one database

Choosing CockroachDB allowed the company to use a single database to help them meet compliance regulations in every state. With CockroachDB they’re able to have a database gateway node in each state where they do business, and easily add new states as their coverage grows. Because CockroachDB functions as a single logical database, the application is able to talk to nodes in each respective state and use geo-partitioning to ensure data remains properly domiciled. 

CockroachDB also natively supports the hybrid infrastructure the company created to help satisfy The Wire Act regulations. And, because CockroachDB automatically scales horizontally, it can handle the influx of transactions from high-demand events like the Super Bowl without taking a performance hit.

Savings, speed, and simplified scaling with CockroachDB

1. Engineering talent: Scaling into new markets

Hiring engineers is really, really hard. This report from LinkedIn found that it took, on average, 49 days to hire an engineer - that’s almost two months. Even if you’re able to hire for multiple open heads concurrently, it’s still a massive lead time. That’s money lost.

This company reported an astonishing 98% faster time to market for entering new regions with CockroachDB’s built-in data domiciling capabilities.

With their original PostgreSQL database, they had to hire five to 10 new technical headcount for each state they launched in, in order to comply with Wire Act regulations. With CockroachDB, adding a new state became as simple as adding a new node or cluster. No engineering effort was required.

If they had stayed with the PostgreSQL database they would have needed to hire an average 7.5 FTEs per state. The company has thus far avoided the need to hire approximately 30 staff augments, for an estimated savings of $6,030,000.

2. FTE savings: Lean and agile operations

Choosing CockroachDB over Amazon RDS PostgreSQL, which the company also evaluated, allowed them to keep their tech team lean and agile. At the time, their technology department was about 50 people, and they wanted to stay lean as they scaled. With PostgreSQL, they were expecting to have needed to add between 10-20 engineers – a 20%-40% increase in headcount.

3. Faster product development velocity

This net-new application is available in multiple states and continues expanding into new markets.

4. Truly unique product differentiation that better serves customers

No other sports betting application has the ability for a user to move from state to state and place wagers with the guaranteed ability to process in-state betting data, to help comply with The Wire Act. This ability is made possible by CockroachDB’s unique multi-regional data-homing capabilities.

5. Savings on software services

The company was able to eliminate additional software services that were in use for replicating and moving data because these capabilities are built into CockroachDB. This cut out the cost of these services and further simplified their technology stack.

Further Reading

If you want to read more about how CockroachDB fits with real-money gaming applications or with related financial services workloads like payment processing check out the following resources:

About the author

Michelle Gienow github link linkedin link

Michelle Gienow is a recovering journalist turned front end developer based in Baltimore, MD. She creates content around her central obsessions: Jamstack, distributed architecture and developing a cloud native mindset.

Keep Reading

Live betting on ACID: Challenges of building a next-gen gambling app

Imagine you’re watching a baseball game. In the middle of the fifth inning, your pitcher throws a strike, and then …

Read more
How TreesPlease Games builds gaming infra with CockroachDB Serverless

The gaming industry is all about delivering a great end-user experience which means building relationships with players …

Read more
The history of databases at Netflix: From Cassandra to CockroachDB

In 2008, after Netflix pivoted from DVD-by-mail to streaming, they were running the streaming service on premise and …

Read more