> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Choose a Multi-Region Configuration

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

This page has high-level information about how to configure a <InternalLink path="multiregion-overview">multi-region cluster's</InternalLink> <InternalLink path="multiregion-overview#survival-goals">survival goals</InternalLink> and <InternalLink path="multiregion-overview#table-localities">table localities</InternalLink>.

## Multi-region configuration options

The options for configuring your multi-region cluster include:

* *Change nothing*: Using the <InternalLink path="multiregion-overview">default settings</InternalLink>, you get:
  * Zone survival (the default).
  * Low-latency reads and writes from a single region.
  * A choice of low-latency stale reads or high-latency fresh reads from other regions (and high-latency fresh reads is the default).

* *Change only <InternalLink path="multiregion-overview#survival-goals">survival goals</InternalLink>*: This configuration is useful for single-region apps that need higher levels of survival. In this configuration, you move from availability zone (AZ) survival to get:
  * Region survival.
  * Low-latency reads from a single region.
  * A choice of low-latency stale reads or high-latency fresh reads from other regions (and high-latency fresh reads is the default).
  * Higher-latency writes from all regions (due to region survival).

* *Change only <InternalLink path="multiregion-overview#table-localities">table localities</InternalLink>*: This is useful for multi-region apps that require different read and write latency guarantees for different tables in the database, and are not concerned with surviving a region failure. In this configuration, you get:
  * Zone survival (the default).
  * For <InternalLink path="table-localities#global-tables">global tables</InternalLink>, low-latency reads from all regions.
  * For <InternalLink path="table-localities#regional-by-row-tables">regional by row tables</InternalLink>, low-latency reads and writes from each row's <InternalLink path="alter-table">home region</InternalLink>, and low-latency <InternalLink path="follower-reads">follower reads</InternalLink> from all other regions.

* *Change both <InternalLink path="multiregion-overview#survival-goals">survival goals</InternalLink> and <InternalLink path="multiregion-overview#table-localities">table localities</InternalLink>*: This is useful for multi-region apps that want a high level of survival. In this configuration, you move from zone survival and get:
  * Region survival.
  * Low-latency reads from all regions.
  * Higher-latency writes from all regions (due to region survival).

## Configuration options vs. performance characteristics and application styles

The following table offers another view of how the various configuration options map to:

* The performance characteristics of specific survival goal and table locality combinations.
* The types of applications that can benefit from each combination.

| locality ↓ survival → | `ZONE`                                                                                                                   | `REGION`                                                                                                                                                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `REGIONAL BY TABLE`   | Low-latency for single-region writes and multi-region stale reads.                                                       | Single-region writes are higher latency than for `ZONE`, as at least one additional region must be consulted for each write. Stale multi-region reads are of comparable latency to `ZONE` survival.                                                      |
|                       | Single-region apps that can accept region failure.                                                                       | Single-region apps that must survive region failure.                                                                                                                                                                                                     |
| `REGIONAL BY ROW`     | Low-latency consistent multi-region reads and writes for rows that are homed in specific regions.                        | Low-latency consistent reads from a row's home region. Low-latency consistent <InternalLink path="follower-reads">stale reads</InternalLink> from outside the row's home region. Higher-latency writes if writing to a row from outside its home region. |
|                       | Multi-region apps that read and write individual rows of the table from a specific region and can accept region failure. | Multi-region apps that read and write individual rows of the table from a specific region and must survive a region failure.                                                                                                                             |
| `GLOBAL`              | Low-latency multi-region reads. Writes are higher latency than reads.                                                    | Low-latency multi-region reads.  Writes are higher latency than reads. There should be minimal difference in write latencies between `ZONE` and `REGION` survival.                                                                                       |
|                       | Multi-region apps that need low-latency reads of a "read-mostly" table.                                                  | Multi-region apps that need low-latency reads of a "read-mostly" table and must survive a region failure.                                                                                                                                                |

Different databases and tables within the same cluster can each use different combinations of these settings.

For new clusters using the <InternalLink path="multiregion-overview">multi-region SQL abstractions</InternalLink>, Cockroach Labs recommends lowering the <InternalLink path="cockroach-start">`--max-offset`</InternalLink> setting to `250ms`. This setting is especially helpful for lowering the write latency of <InternalLink path="table-localities#global-tables">global tables</InternalLink>. Nodes can run with different values for `--max-offset`, but only for the purpose of updating the setting across the cluster using a rolling upgrade.

## See also

* <InternalLink path="multiregion-overview">Multi-Region Capabilities Overview</InternalLink>
* <InternalLink path="table-localities#when-to-use-regional-vs-global-tables">When to Use `REGIONAL` vs. `GLOBAL` Tables</InternalLink>
* <InternalLink path="multiregion-survival-goals#when-to-use-zone-vs-region-survival-goals">When to Use `ZONE` vs. `REGION` Survival Goals</InternalLink>
* [Survive Region Outages with CockroachDB](https://www.cockroachlabs.com/blog/under-the-hood-multi-region/)
* <InternalLink path="topology-patterns">Topology Patterns</InternalLink>
* <InternalLink path="disaster-recovery">Disaster Recovery</InternalLink>
* <InternalLink path="demo-low-latency-multi-region-deployment">Low Latency Reads and Writes in a Multi-Region Cluster</InternalLink>
* <InternalLink path="multiregion-overview#secondary-regions">Secondary regions</InternalLink>
* <InternalLink path="alter-database#set-secondary-region">`SET SECONDARY REGION`</InternalLink>
* <InternalLink path="alter-database#drop-secondary-region">`DROP SECONDARY REGION`</InternalLink>
