The Art of Data Residency and Application Architecture
/* A demo of multi-region capabilities in CockroachDB. */
Why a multi-region database?
When your application serves users across states, countries, or continents, you need to make sure you keep your latency low, meet local regulations, and deliver an always-on experience.
The solution: running a multi-region database.
Setting up and managing a multi-region database with traditional tools can be labor intensive. But CockroachDB can help. A distributed SQL database, CockroachDB lets you pin data to specific locations (servers, availability zones, or cloud regions) to optimize latency, comply with regional regulations, and maintain high availability.
In this demo, we illustrate CockroachDB's multi-region capabilities. We're running a single logical CockroachDB serverless instance spanning three AWS regions:
Make your own art
In this demo, you'll create art that resides in specific cloud regions. Some data is stored in either the United States or Europe, while other data is stored in both places. That's because the app can write to any region from anywhere.Try the demo
View the Gallery
When you view the Gallery, you'll only see art that resides in your current location. That's because the app can only read data from your closest region(s). Some data crosses all regions, so you'll always see it.View the Gallery
The artwork's pattern and logo settings are stored in both the United States and Europe, and are made available for viewing globally. The data is replicated across all three regions in the CockroachDB cluster. This setting is useful for application data that's universally relevant.
Use the toggle below to understand how the Gallery data is represented in CockroachDB.
United States data
Certain images and colors in the demo are stored in the United States. If you're located anywhere in the world except Europe, you can only see United States data in the Gallery.
The data is replicated between CockroachDB instances on the East coast and West coast to provide high availability and guard against regional outages.
Certain images and colors in the demo are stored in Europe and will never be available outside of it. If you're located in Europe, you can only see European data. Given the stringent European data privacy regulations, this capability is especially important.Try the demo
Learn how it works
We've written an in-depth blog post explaining how we used multi-region AWS architecture together with CockroachDB Serverless to make this demo.
Get started withCockroachDB today
- No credit card required
- Free storage up to 10 GB
- Single-click deployment