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 are running a single logical CockroachDB serverless instance spanning three AWS regions:
Make Your Own Art
In this demo, you will 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 AWS multi-region application architecture together with CockroachDB Serverless to make this demo.
Get Started WithCockroachDB Today
- No credit card required.
- Free up to 5 GB storage.
- Single-click deployment.