LAUNCHMongoDB 8.3 is built for the sub-100ms retrieval & zero downtime AI demands. Read blog >
AI DATAStop fighting your data layer. Get the memory & retrieval agents need to scale. Read blog >

Coinbase scales to match volatile crypto traffic with MongoDB

A person holding a smartphone and interacting with it

The Challenge

Coinbase, a cryptocurrency exchange, needed scalable database clusters that could keep up with highly volatile and unexpected traffic without affecting performance and customer experience.

Our Solution

Coinbase architected a MongoDB Atlas solution to accelerate large cluster scaling, then built a machine learning model to predict traffic volatility and automatically trigger parallel cluster scaling.

Outcome

  • 60% reduction in scaling time
  • 3.25x reduction in cluster deployment time
  • Increased resiliency for a better customer experience
industry_enterprise

Industry

Financial Services

Computer Software & Technology

atlas_product_family

Product

MongoDB Atlas

Atlas Data Federation

atlas_for_edge

Use Case

Payments

Cryptocurrency/Blockchain

Watch Sean Hurley, Staff Software Engineer, discuss how Coinbase leveraged MongoDB Atlas to reduce scaling time by 60%.

 

 

THE CHALLENGE

Scaling to meet Coinbase’s volatile traffic demand

While the cryptocurrency market can be volatile and unpredictable, leading exchanges must provide seamless performance irrespective of traffic levels. When Coinbase — one of the largest cryptocurrency exchanges in the United States — wanted to improve the user experience, its first step was to optimize its MongoDB database clusters to reduce downtime.

When Coinbase launched in 2012, it chose to use MongoDB hosted on Amazon Web Services. Since then, the company has grown from a few small database clusters to a fleet of roughly 700 clusters and has migrated to MongoDB Atlas with Atlas Data Federation powering its data warehousing pipeline.

Unlike traditional fintech companies, cryptocurrency exchanges are vulnerable to highly volatile and unexpected traffic. During periods of heavy demand, Coinbase’s largest clusters could take over an hour to scale. For the fast-moving cryptocurrency market, this lead time is unacceptable, as users suffer due to the performance degradation.

“When we see big traffic spikes, we need to scale our clusters as quickly as possible,” said Sean Hurley, Staff Software Engineer at Coinbase. “We can’t always be provisioned for peak capacity; we need to dynamically scale up and down with our traffic needs.”

 

OUR SOLUTION

Building a predictive scaling solution with MongoDB Atlas

Over the course of 90 days, Coinbase architected a MongoDB Atlas solution that would accelerate scaling for large clusters. “The MongoDB team has been really willing to engage and understand what we’re trying to accomplish,” said Hurley. “That collaboration has gone a long way.” First, Coinbase identified the clusters correlated with heavy user traffic, then used historical metrics to model how much capacity the clusters would need during traffic spikes.

Coinbase
“We’ve brought scaling times down from upward of 70 minutes to 25 minutes — less than half the time it used to take.”
Sean Hurley
Staff Software Engineer

Next, Coinbase built a machine learning (ML) model to predict traffic volatility using cryptocurrency price data. The model automatically triggers the clusters to scale up 60 minutes prior to anticipated traffic spikes. “With the heads-up from our ML model, we can have all our clusters scaled up before traffic surges,” said Hurley.

Finally, Coinbase and MongoDB introduced parallel scaling to reduce the time between triggering clusters to scale and reaching peak performance. Previously, scaling went node by node. Now, similar node types are grouped and scaled at the same time. This accelerated new cluster deployment times by up to 3.25 times.

 

OUTCOME

Seamlessly handling crypto volatility

“We’ve brought scaling times down from upward of 70 minutes to 25 minutes — less than half the time it used to take,” said Hurley. This speed increase falls well within the predictive model’s advance traffic notice. Coinbase’s platform is now more resilient, underpinning a great user experience for its customers despite unpredictable volatility.

As a result, Coinbase’s end users gained a more seamless experience. Previously, traffic spikes could impact some parts of the Coinbase app. Now, users don’t even notice changes happening behind the scenes.

Coinbase’s next phase is optimization. It is considering sharding to address vertical scaling limits and building tooling to catch bad queries before they hit production.

Coinbase
“Now that we have these automatic systems in place, we have more time. We can focus on providing value for both engineers at Coinbase and our end users.”
Sean Hurley
Staff Software Engineer

Want to dive deeper into Coinbase’s use case? Watch the full breakout session from our 2024 MongoDB.local Austin event.

Run MongoDB without the operational burden

Atlas is the simplest way to deploy MongoDB. Get global resilience, push-button scalability, and advanced security.
Learn More
Illustration of a database stack

Explore more success stories

View all stories
Novo Nordisk logo
With Video

Novo Nordisk

This Danish pharmaceutical giant became the first in the industry to generate a complete clinical study report (CSR) in minutes with generative AI and MongoDB Atlas.

Read more
Toyota Connected logo
With Video

Toyota Connected

See how Toyota Connected migrated to Atlas and AWS to enhance reliability for its safety platform.

Read more
L'oreal Groupe logo
With Video

L'oreal Groupe

Discover how L’Oréal improves app performance and velocity with MongoDB Atlas.

Read more

Take the next step

Get access to all the tools and resources you need to start building something great when you register today.
Get StartedTalk to an expert
Illustration of a database.