New in v21.1: Table Localities tell CockroachDB how to optimize access to a table's data in a multi-region cluster. CockroachDB uses the table locality setting to determine how to optimize access to the table's data from that locality.
The following table localities are available:
REGIONAL tables if:
- Your application requires low-latency reads and writes from a single region (either at the row level or the table level).
- Access to the table's data can be slower (higher latency) from other regions.
GLOBAL tables if:
- Your application has a "read-mostly" table of reference data that is rarely updated, and that needs to be available to all regions.
- You can accept that writes to the table will incur higher latencies from any given region, since writes use a novel non-blocking transaction protocol that uses a timestamp "in the future". Note that the observed write latency is dependent on the
For more information about how to choose an overall multi-region configuration, see Choosing a multi-region configuration.
For new clusters using the multi-region SQL abstractions, we recommend lowering the
--max-offset setting to
250ms. This is especially helpful for lowering the write latency of global tables. Note that this will require restarting all of the nodes in your cluster at the same time; it cannot be done with a rolling restart.
- Multi-region Overview
- Choosing a multi-region configuration
- When to use
- Multi-region SQL performance
- Topology Patterns
- Disaster Recovery
- Migrate to Multi-region SQL