CockroachDB 21.1: The Most Powerful Global Database is Now the Easiest

CockroachDB 21.1: The Most Powerful Global Database is Now the Easiest

Today we’re excited to announce the release of CockroachDB 21.1, the latest version of our distributed SQL database. For this release, we took a step back and asked how we can make even more development teams successful with multi-region clusters. Thousands of engineering hours and Github tickets later, the result of our efforts is a dramatically simpler and more accessible developer experience for managing the location of data.

CockroachDB’s multi-region capabilities are a core set of features that let you manage data across multiple cloud availability zones and regions, to optimize latency and availability. For 21.1, our team has re-designed and re-architected these features, so you can now control your data’s latency and availability with just a few declarative SQL statements.

This new abstraction brings multi-region capabilities to all developers at any experience level, so they can start small with a single region, grow as they need, and easily scale data across regions to deliver faster, more reliable experiences to users everywhere.

We’ve also delivered a variety of other updates in CockroachDB 21.1, so you can now:

Additionally, we’ve recently made the following improvements to CockroachCloud, our fully managed cloud version of CockroachDB:

  • Monitor your CockroachCloud cluster with new email alerts for when CPU, memory, storage, or IOPS exceed a threshold over time, and integrate more easily with incident response tools like PagerDuty.
  • View SQL statements and database sessions right in the CockroachCloud Console, to optimize and troubleshoot performance.
  • SOC 2 Type 2 Certification: we’ve completed our security certification for SOC 2 compliance for CockroachCloud. 

Read on for more details on what’s new, or head over to our Docs page for a deep-dive into the full list. And as always, we’d love to hear what you think on our Community Slack.

CockroachDB 21.1 makes multi-region data dead-simple

CockroachDB’s horizontal scale eliminates the pain developers experience with common techniques like manual sharding. Scaling up or down is as easy as adding or removing a node, and data automatically distributes across nodes without any manual intervention needed. This architecture, combined with 3x data replication, enables CockroachDB’s high availability. Your cluster can survive losing a node without any impact.

In addition to these default settings, you can also use CockroachDB’s unique multi-region features to customize your data’s location, availability, and latency based on your application’s needs. These features let you scale CockroachDB across multiple availability zones and cloud regions, then anchor data to location by database, table, and row.

UI of a multi-region deployment in CockroachDB DB Console

[Image 1:] Scale one logical cluster across multiple cloud regions in CockroachDB.

With CockroachDB’s multi-region features, developers can achieve data that survives entire region failures, serve low-latency reads and writes globally, and help comply with data regulations like GDPR. While these capabilities are incredibly valuable, the previous methods to configure them in CockroachDB were fairly complex. We realized there was room to make them much easier to use, so they could be even more impactful.

In CockroachDB 21.1, you can now control your data’s availability and latency with only a few declarative SQL statements. Pick your survival and latency goals, and CockroachDB does everything for you under the covers. 

It’s really as simple as four steps (yes, that’s right, just four):

  1. Deploy your nodes to multiple regions

  2. Define which regions you want your databases to operate in using a few SQL statements

  3. Define survival goals for your databases using a few SQL statements

  4. Create or alter tables using one of three new table locality settings, again through a few SQL statements:

    • Regional tables: fast reads and writes from one region
    • Regional by row tables: fast reads and writes from one region, and different rows in the table can be optimized for access from different regions
    • Global tables: fast reads from all regions, at the expense of slower writes

multi-region deployment from the command line (CLI) in cockroachDB

[Image 2:] In CockroachDB, distribute data across multiple regions for fast writes with just an ALTER TABLE command.

In addition to these usability updates, we’ve also added updates that:

  • Make it simpler to expand from a single region to multiple regions, by just adding a new region to your database
  • Enable your cluster to understand which region data was inserted into, and subsequently keep that data in that region, eliminating the need for complicated application logic

We believe your aspirations shouldn’t be constrained by your infrastructure. With the updates in CockroachDB 21.1, everyone—not just massive teams and tech giants—can meet high demands for application performance and availability. And you no longer need to start your business on a platform that’s “good enough,” hamstringing yourself for when your business grows, and suffering the pain of a migration. Now, you can build from the start on a platform that will take you from one cloud region to a global footprint, from three people in a garage to a multi-million dollar business.

To see these features for yourself, we’ve put together a quick demo video.

Get started on CockroachDB, instantly and for free

This blog post covers just a sampling of the updates in 21.1. For a full list, head over to the 21.1 Docs. To try out these features yourself, spin up a free cluster instantly on CockroachCloud, our CockroachDB-as-a-Service offering.

Also, we go deeper into the challenges of distributed services, why multi-region applications matter, and how our engineering and product teams partnered to make these concepts simple in 21.1 in this Cockroach Hour: ALTER DATABASE SURVIVE REGION FAILURE livestream. And you should check out the blog about how you can deploy an application across multiple regions in just three steps using our new capabilities.

Finally, we love feedback and would love to hear from you. Please join our community and let us know your thoughts!

< Get Started with CockroachDB for Free >