In a multi-region deployment, are a good choice for tables with the following requirements:
Read latency must be low, but write latency can be higher.
Reads can be historical.
Rows in the table, and all latency-sensitive queries, cannot be tied to specific geographies (e.g., a reference table).
Table data must remain available during a region failure.
If reads can use stale data, use . If reads must be exactly up-to-date, use to achieve . Up-to-date reads are required by tables referenced by , for example.
Multi-region topology patterns are almost always table-specific. If you haven’t already, to ensure you choose the right one for each of your tables.
Review how data is replicated and distributed across a cluster, and how this affects performance. It is especially important to understand the concept of the “leaseholder”. For a summary, see . For a deeper dive, see the CockroachDB .
Review the concept of , which CockroachDB uses to place and balance data based on how you define .
Review the recommendations and requirements in our .
This topology doesn’t account for hardware specifications, so be sure to follow our and perform a POC to size hardware for your use case. For optimal cluster performance, Cockroach Labs recommends that all nodes use the same hardware and operating system.
Start each node with the flag specifying its region and AZ combination. For example, the following command starts a node in the west1 AZ of the us-west region:
With each node started with the flag specifying its region and zone combination, CockroachDB will balance the replicas for a table across the three regions:
You configure your application to use by adding an clause when reading from the table. With this clause CockroachDB reads slightly historical data from the closest replica so as to avoid being routed to the leaseholder, which may be in an entirely different region. Writes, however, will still leave the region to get consensus for the table.
Decide which type of follower read to perform: exact staleness or bounded staleness. For more information about when to use each type of read, see and .
To use , configure your app to use with the whenever reading from the table:
> SELECT code FROM postal_codes AS OF SYSTEM TIME follower_read_timestamp() WHERE id = 5;
You can also set the AS OF SYSTEM TIME value for all operations in a read-only transaction:
> BEGIN;SET TRANSACTION AS OF SYSTEM TIME follower_read_timestamp(); SELECT code FROM postal_codes WHERE id = 5; SELECT code FROM postal_codes WHERE id = 6;COMMIT;
Using the statement as shown in the preceding example will make it easier to use exact staleness follower reads from .
To use , configure your app to use with the whenever reading from the table. Note that only single-row point reads in single-statement (implicit) transactions are supported.
SELECT code FROM postal_codes AS OF SYSTEM TIME with_max_staleness('10s') where id = 5;
Reads retrieve historical data from the closest replica and, therefore, never leave the region. This makes read latency very low but slightly stale.For example, in the following diagram:
The read request in us-central reaches the regional load balancer.
The load balancer routes the request to a gateway node.
The gateway node routes the request to the closest replica for the table. In this case, the replica is not the leaseholder.
The replica retrieves the results as of your preferred staleness interval in the past and returns to the gateway node.
The gateway node returns the results to the client.
The replicas for the table are spread across all 3 regions, so writes involve multiple network hops across regions to achieve consensus. This increases write latency significantly.For example, in the following animation:
The write request in us-central reaches the regional load balancer.
The load balancer routes the request to a gateway node.
The gateway node routes the request to the leaseholder replica for the table in us-east.
Once the leaseholder has appended the write to its Raft log, it notifies its follower replicas.
As soon as one follower has appended the write to its Raft log (and thus a majority of replicas agree based on identical Raft logs), it notifies the leaseholder and the write is committed on the agreeing replicas.
The leaseholder then returns acknowledgement of the commit to the gateway node.
The gateway node returns the acknowledgement to the client.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"CockroachDB","colors":{"primary":"#9059FF","light":"#9059FF","dark":"#9059FF"},"logo":{"light":"https://mintcdn.com/cockroachlabs/4WvUnbVuGZfqM4kW/images/CockroachLabs_Wordmark_Black.png?fit=max\u0026auto=format\u0026n=4WvUnbVuGZfqM4kW\u0026q=85\u0026s=54ccae625c9986bf1df8ddc7b2c571f0","dark":"https://mintcdn.com/cockroachlabs/4WvUnbVuGZfqM4kW/images/CockroachLabs_Wordmark_White.png?fit=max\u0026auto=format\u0026n=4WvUnbVuGZfqM4kW\u0026q=85\u0026s=0dd9b66973a1c7d3dd72aa67b6094efe","href":"https://www.cockroachlabs.com/"},"favicon":{"light":"https://mintcdn.com/cockroachlabs/2yihO7vMXnL0G_07/images/favicon.svg?fit=max\u0026auto=format\u0026n=2yihO7vMXnL0G_07\u0026q=85\u0026s=01f9aa59c9f275e1f35cd424a27d2551","dark":"https://mintcdn.com/cockroachlabs/2yihO7vMXnL0G_07/images/favicon.svg?fit=max\u0026auto=format\u0026n=2yihO7vMXnL0G_07\u0026q=85\u0026s=01f9aa59c9f275e1f35cd424a27d2551"},"api":{"examples":{"defaults":"required","languages":["curl"]}},"appearance":{"default":"light"},"navbar":{"primary":{"type":"button","label":"Get started free","href":"https://cockroachlabs.cloud/signup?referralId=cc_nav_global\u0026_ga=2.242886210.1147139380.1759903632-41552699.1759903632"}},"footer":{"socials":{"youtube":"https://www.youtube.com/@cockroachdb","x":"https://x.com/CockroachDB","linkedin":"https://www.linkedin.com/company/cockroach-labs/mycompany/verification","instagram":"https://www.instagram.com/cockroachdb"},"links":[{"header":"Product","items":[{"label":"CockroachDB","href":"https://www.cockroachlabs.com/product"},{"label":"CockroachDB Cloud","href":"https://www.cockroachlabs.com/product/cockroachcloud"},{"label":"Compare","href":"https://www.cockroachlabs.com/compare"},{"label":"Pricing","href":"https://www.cockroachlabs.com/pricing"},{"label":"Get CockroachDB","href":"https://www.cockroachlabs.com/get-started-cockroachdb"},{"label":"Sign In","href":"https://cockroachlabs.cloud/"}]},{"header":"Resources","items":[{"label":"Guides","href":"https://resources.cockroachlabs.com/guides"},{"label":"Webinars","href":"https://www.cockroachlabs.com/community/webinars"},{"label":"Videos","href":"https://www.cockroachlabs.com/resources/video"},{"label":"Architecture Overview","href":"https://www.cockroachlabs.com/docs/stable/architecture/overview"},{"label":"FAQ","href":"https://www.cockroachlabs.com/docs/stable/frequently-asked-questions"},{"label":"Security","href":"https://www.cockroachlabs.com/security"}]},{"header":"Learn \u0026 Support","items":[{"label":"Docs","href":"https://www.cockroachlabs.com/docs"},{"label":"University","href":"https://learn.cockroachlabs.com/"},{"label":"Developers","href":"https://www.cockroachlabs.com/developers"},{"label":"Forum","href":"https://forum.cockroachlabs.com/"},{"label":"Slack","href":"https://cockroa.ch/slack"},{"label":"Support Portal","href":"https://support.cockroachlabs.com/hc/en-us"},{"label":"Contact Us","href":"https://www.cockroachlabs.com/contact"}]},{"header":"Company","items":[{"label":"About","href":"https://www.cockroachlabs.com/about"},{"label":"Blog","href":"https://www.cockroachlabs.com/blog"},{"label":"Careers","href":"https://www.cockroachlabs.com/careers"},{"label":"Customers","href":"https://www.cockroachlabs.com/customers"},{"label":"News","href":"https://www.cockroachlabs.com/press"},{"label":"Privacy","href":"https://www.cockroachlabs.com/privacy"},{"label":"Terms of Use","href":"https://www.cockroachlabs.com/website-terms-of-use"}]}]},"fonts":{"heading":{"family":"Poppins"},"body":{"family":"Open Sans"}},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}},"latex":true},"integrations":{"gtm":{"tagId":"GTM-NR8LC4"}},"errors":{"404":{"redirect":false,"title":"Page not found","description":"The page you're looking for doesn't exist. [Return to docs home](/index.html)."}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"interaction":{"drilldown":false},"navigation":{"global":{"anchors":[{"anchor":"University","icon":"graduation-cap","href":"https://learn.cockroachlabs.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cockroachlabs","hasAudioNarration":false,"actualSubdomain":"cockroachlabs","customDomains":["docs.cockroachlabs.com"],"gitSource":{"type":"github","owner":"cockroachlabs","repo":"docs","deployBranch":"main","contentDirectory":"cockroachlabs-preview-main","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aedf6547caf8c60034a2641","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"CockroachDB","count":6950},{"language":"default","tag":"Docs","count":3216},{"language":"default","tag":"SQL","count":2566},{"language":"default","tag":"Statements","count":1714},{"language":"default","tag":"Self-Hosted Deployments","count":1456},{"language":"default","tag":"Reference","count":774},{"language":"default","tag":"Cloud Deployments","count":616},{"language":"default","tag":"Endpoints","count":528},{"language":"default","tag":"Cloud API Reference","count":518},{"language":"default","tag":"Get Started","count":441}],"searchSettings":{"isFiltersEnabled":true,"showContentSnippets":true,"fullPageSearch":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":":root{--inline-code-bg-light: rgb(var(--gray-200) / 0.92);--inline-code-bg-dark: rgb(255 255 255 / 0.08)}.prose :not(pre)>code{background-color:var(--inline-code-bg-light)!important}.dark .prose :not(pre)>code{background-color:var(--inline-code-bg-dark)!important}@media (min-width: 1536px){#navbar>.max-w-8xl,[class*=\"peer-[.is-not-custom]:peer-[.is-not-center]:max-w-8xl\"]{width:100%!important;max-width:none!important}}#navigation-items{display:flex;flex-direction:column}#navigation-items>ul:not(.sidebar-group){order:1;margin-top:1.5rem}.crdb-metrics-table table{table-layout:fixed!important;width:100%!important;min-width:0!important;max-width:100%!important;border-collapse:collapse}.crdb-metrics-table table td,.crdb-metrics-table table th{min-width:0!important;overflow-wrap:anywhere;word-break:break-word}.crdb-fixed-table table{table-layout:fixed!important;width:100%!important;min-width:0!important;max-width:100%!important;border-collapse:collapse}.crdb-fixed-table table td,.crdb-fixed-table table th{min-width:0!important;overflow-wrap:anywhere;word-break:break-word}.bg-cover{background-size:cover;background-repeat:no-repeat;background-position:center center}.bg-cover__bg-3-1{background-image:url(\"https://cockroach-labs-docs.imgix.net/bg-3-1.png?auto=format,compress\u0026w=1200\u0026q=40\")}.home-header{border-radius:0.5rem;margin-bottom:2rem!important;padding:2rem}.card{border:1px solid #e5e7eb;border-radius:0.75rem;background-color:white}.dark .card{background-color:#0d1117;border-color:rgba(255, 255, 255, 0.1)}.card-link{text-decoration:none!important;overflow:hidden}.card-link:hover{outline:1px solid rgba(105, 51, 255, 0.55);outline-offset:-1px}.card-link,.card-link:hover{transform:none!important;box-shadow:none!important}.card-link a,.card-link a:hover,.card-link h3,.card-link h3:hover,.card-link p,.card-link p:hover{border:0!important;text-decoration:none!important;transform:none!important}.card-link a{display:block;width:100%}.card-link h3{font-size:1rem!important;font-weight:600!important}.card-body{padding:1.5rem}.landing-column-title{margin-bottom:1rem}.overline{text-transform:uppercase;letter-spacing:0.05em}.btn-redirect{display:inline-flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;border:2px solid #e5e7eb;border-radius:0.5rem;text-decoration:none;transition:border-color 0.2s}.btn-redirect:hover{border-color:#6933ff}.btn-block{display:flex;width:100%;justify-content:center}.dark .btn-redirect{border-color:rgba(255, 255, 255, 0.1)}.article-section-title{font-size:1.25rem!important}.article-lists h3{font-size:0.875rem!important;font-weight:600!important;text-transform:uppercase;letter-spacing:0.05em;color:#6b7280!important}.dark .article-lists h3{color:#9ca3af!important}.article-lists ul{font-size:0.875rem}.shadow{box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.bg-dark-wing{background-color:#152849;border-radius:0.5rem}.text-ice-temple{color:#1bf8ec!important;display:inline-flex;align-items:center;gap:0.375rem}.text-ice-temple img{display:inline-block;margin:0}.bg-dark-wing h2{font-size:clamp(1.25rem, 1rem + 1.5vw, 1.75rem)!important}@media (max-width: 576px){.card-body.bg-dark-wing{padding:1.25rem!important}}.text-decoration-none{text-decoration:none!important}.text-muted{color:#6b7280!important}.card-link .card-desc{font-size:0.9375rem!important;font-weight:400!important;line-height:1.5!important;text-align:left!important;color:#4b5563!important;width:100%;margin-top:0.5rem}.dark .card-link .card-desc{color:#9ca3af!important}.report-tag{display:inline-block;padding:0.25rem 0.75rem;border-radius:0.25rem;background-color:rgba(84, 42, 189, 0.08);color:#542abd}.dark .report-tag{background-color:rgba(84, 42, 189, 0.3);color:#b39dff}.resilience-report-img{background-image:url(\"/images/state-resilience.png\");background-size:cover;background-position:center;min-height:150px;border-radius:0.5rem}.row{display:flex!important;flex-wrap:wrap;margin-left:-0.75rem;margin-right:-0.75rem}.display-flex{display:flex!important}.col-lg-4{flex:0 0 auto;width:100%;padding-left:0.75rem;padding-right:0.75rem}@media (min-width: 992px){.col-lg-4{width:33.333333%!important}}.col-lg-3,.col-sm-6,.col-xs-12{flex:0 0 auto;width:100%!important;padding-left:0.75rem;padding-right:0.75rem}@media (min-width: 992px){.col-lg-3{width:25%!important}}@media (min-width: 576px){.col-sm-6{width:50%!important}}.col-12{width:100%!important}.col-lg-12{width:100%;padding-left:0.75rem;padding-right:0.75rem}@media (min-width: 992px){.col-lg-12{width:100%!important}}.col-md-4,.col-md-8{flex:0 0 auto;width:100%;padding-left:0.75rem;padding-right:0.75rem}@media (min-width: 768px){.col-md-4{width:33.333333%!important}.col-md-8{width:66.666667%!important}}.h-100{height:100%}.d-flex{display:flex}.flex-column{flex-direction:column}.mb-3{margin-bottom:1rem!important}.mb-5{margin-bottom:3rem!important}.pb-5{padding-bottom:3rem!important}.mb-xl-5{margin-bottom:3rem!important}.mt-auto{margin-top:auto!important}.mt-0{margin-top:0!important}.mt-2{margin-top:0.5rem!important}.mt-3{margin-top:1rem!important}.mt-5:not(.code-block){margin-top:3rem!important}.code-block.mb-8{margin-bottom:calc(var(--spacing) * 5)}.pt-5{padding-top:3rem!important}.m-0{margin:0!important}.ml-2{margin-left:0.5rem!important}.mb-0{margin-bottom:0!important}.mb-2{margin-bottom:0.5rem!important}.mb-4{margin-bottom:1.5rem!important}.p-2{padding:0.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.ml-1{margin-left:0.25rem!important}.mr-auto{margin-right:auto!important}.justify-content-center{justify-content:center!important}.align-items-center{align-items:center!important}@media (min-width: 1200px){.p-xl-5{padding:3rem!important}}.mx-0{margin-left:0!important;margin-right:0!important}.text-center{text-align:center}.text-white{color:white!important}.text-black{color:black!important}.dark .text-black{color:white!important}.container{width:100%;max-width:1200px;margin-left:auto;margin-right:auto;padding-left:1rem;padding-right:1rem}.card-header-overlap-text{position:relative}@media (min-width: 768px){.p-md-5{padding:3rem!important}}@media (min-width: 992px){.d-lg-flex{display:flex!important}.mb-lg-0{margin-bottom:0!important}}.prose table{border-collapse:collapse!important}.prose table th,.prose table td{border:1px solid rgb(var(--gray-200))!important}.dark .prose table th,.dark .prose table td{border-color:rgb(var(--gray-700) / 0.5)!important}.prose table th{padding:0.571429em;font-weight:600;vertical-align:bottom;color:var(--tw-prose-headings);text-align:left}.prose table th.center-align{text-align:center}.prose table td{padding:0.571429em;vertical-align:baseline}[data-component-part=\"accordion-description\"]{font-size:0.875rem!important}.accordion.mb-3{margin-bottom:0.25rem!important}@media (max-width: 991.98px){[id^=\"kapa-widget-container\"] button{width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;font-size:0!important}[id^=\"kapa-widget-container\"] button svg{width:18px!important;height:18px!important}[id^=\"kapa-widget-container\"] button span{display:none!important}}table.crdb-fixed-table{table-layout:fixed!important;min-width:0!important;width:100%}table.crdb-fixed-table td,table.crdb-fixed-table th{min-width:0!important;overflow-wrap:break-word;word-break:normal}.sql-grammar svg .line{fill:none;stroke:#262626}.sql-grammar svg .bold-line{stroke:#0A0A0A;shape-rendering:crispEdges;stroke-width:2}.sql-grammar svg .thin-line{stroke:#0F0F0F;shape-rendering:crispEdges}.sql-grammar svg .filled{fill:#262626;stroke:none}.sql-grammar svg text.terminal{font-family:Verdana, Sans-serif;font-size:12px;fill:#0A0A0A;font-weight:bold}.sql-grammar svg text.nonterminal{font-family:Verdana, Sans-serif;font-size:12px;fill:#0055FF}.sql-grammar svg text.regexp{font-family:Verdana, Sans-serif;font-size:12px;fill:#0F0F0F}.sql-grammar svg rect,.sql-grammar svg circle,.sql-grammar svg polygon{fill:#262626;stroke:#262626}.sql-grammar svg rect.terminal{fill:#ffffff;stroke:#262626}.sql-grammar svg rect.nonterminal{fill:#FFFFFF;stroke:#262626}.sql-grammar svg rect.text{fill:none;stroke:none}.sql-grammar svg polygon.regexp{fill:#FFFFFF;stroke:#262626}.sql-grammar svg{background-color:#ffffff}.sql-grammar a[name]::before{content:'';display:block;height:80px;margin:-80px 0 0}.sql-grammar a[name]:focus{outline:0}pre[language=\"sql\"][data-crdb-prompt-stripped] code::before{content:\"> \";color:#94e2d5;user-select:none}.mark-yes{color:#008a5e;font-weight:600}.dark .mark-yes{color:#3ddc97}"},{"filePath":"collapse-nav.css","content":"html:not(.crl-nav-off) [data-layout-item=\"sidebar\"] li[data-title]:not([data-active]):not([data-crl-keep])>button+ul,html:not(.crl-nav-off) [data-layout-item=\"mobile-nav\"] li[data-title]:not([data-active]):not([data-crl-keep])>button+ul{display:none}html:not(.crl-nav-off) [data-layout-item=\"sidebar\"] li[data-title]:not([data-active]):not([data-crl-keep])>button svg,html:not(.crl-nav-off) [data-layout-item=\"mobile-nav\"] li[data-title]:not([data-active]):not([data-crl-keep])>button svg{rotate:none!important;transform:none!important}"}],"page":{"pagePath":"docs/stable/topology-follower-reads","slug":"/docs/stable/topology-follower-reads","pageMetadata":{"title":"Follower Reads Topology","old_description":"Guidance on using the follower reads topology in a multi-region deployment.","description":null,"href":"/docs/stable/topology-follower-reads"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const InternalLink=({version,path=``,children,...props})=>{const _components={a:`a`,..._provideComponents()};let detectedVersion=version||`stable`;if(typeof window!==`undefined`\u0026\u0026!version){const match=window.location.pathname.match(/\\/docs\\/([^/]+)/);if(match){detectedVersion=match[1]}}const normalizedPath=path.startsWith(`/`)?path.slice(1):path;return _jsx(_components.a,{href:`/docs/${detectedVersion}/${normalizedPath}`,...props,children})};function _createMdxContent(props){const _components={code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage,Tip,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`In a multi-region deployment, `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads`,children:`follower reads`})}),` are a good choice for tables with the following requirements:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Read latency must be low, but write latency can be higher.`}),`\n`,_jsx(_components.li,{children:`Reads can be historical.`}),`\n`,_jsxs(_components.li,{children:[`Rows in the table, and all latency-sensitive queries, `,_jsx(_components.strong,{children:`cannot`}),` be tied to specific geographies (e.g., a reference table).`]}),`\n`,_jsx(_components.li,{children:`Table data must remain available during a region failure.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If reads can use stale data, use `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads#stale-follower-reads`,children:`stale follower reads`})}),`. If reads must be exactly up-to-date, use `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`global-tables`,children:`global tables`})}),` to achieve `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads#follower-read-types`,children:`strong follower reads`})}),`. Up-to-date reads are required by tables referenced by `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`foreign-key`,children:`foreign keys`})}),`, for example.`]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-begin`,children:`Before you begin`}),`\n`,_jsx(Heading,{level:`3`,id:`fundamentals`,children:`Fundamentals`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Multi-region topology patterns are almost always table-specific. If you haven’t already, `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`topology-patterns#multi-region`,children:`review the full range of patterns`})}),` to ensure you choose the right one for each of your tables.`]}),`\n`,_jsxs(_components.li,{children:[`Review how data is replicated and distributed across a cluster, and how this affects performance. It is especially important to understand the concept of the “leaseholder”. For a summary, see `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/reads-and-writes-overview`,children:`Reads and Writes in CockroachDB`})}),`. For a deeper dive, see the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/overview`,children:`Architecture Overview`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Review the concept of `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-start#locality`,children:`locality`})}),`, which CockroachDB uses to place and balance data based on how you define `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`configure-replication-zones`,children:`replication controls`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Review the recommendations and requirements in our `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`recommended-production-settings`,children:`Production Checklist`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[`This topology doesn’t account for hardware specifications, so be sure to follow our `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`recommended-production-settings#hardware`,children:`hardware recommendations`})}),` and perform a POC to size hardware for your use case. For optimal cluster performance, Cockroach Labs recommends that all nodes use the same hardware and operating system.`]}),`\n`,_jsxs(_components.li,{children:[`Adopt relevant `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`performance-best-practices-overview`,children:`SQL Best Practices`})}),` to ensure optimal performance.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`cluster-setup`,children:`Cluster setup`}),`\n`,_jsxs(_components.p,{children:[`Each `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`topology-patterns#multi-region`,children:`multi-region pattern`})}),` assumes the following setup:`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_multi-region_hardware.png?fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=810cffba5f7294be67bc34e0b3276c28`,alt:`Multi-region hardware setup`,\"data-og-width\":`960`,width:`960`,\"data-og-height\":`540`,height:`540`,\"data-path\":`images/common/topology-patterns/topology_multi-region_hardware.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_multi-region_hardware.png?w=280\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=49efe4fc84ce77d81c890bf550309a40 280w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_multi-region_hardware.png?w=560\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=68bb1219a12b060462c047efe010d352 560w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_multi-region_hardware.png?w=840\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=90b6319df32fbf610384434812c6d4d1 840w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_multi-region_hardware.png?w=1100\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=557632b3ce072f1cc23e138dd2b3ae96 1100w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_multi-region_hardware.png?w=1650\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=6ae852d2d5ccd37187f4bdd59c01a4b3 1650w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_multi-region_hardware.png?w=2500\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=a4e7b7419e5da176a0349971e3fb81ef 2500w`}),`\n`,_jsx(Heading,{level:`4`,id:`hardware`,children:`Hardware`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`3 regions`}),`\n`,_jsx(_components.li,{children:`Per region, 3+ AZs with 3+ VMs evenly distributed across them`}),`\n`,_jsxs(_components.li,{children:[`Region-specific app instances and load balancers`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Each load balancer redirects to CockroachDB nodes in its region.`}),`\n`,_jsx(_components.li,{children:`When CockroachDB nodes are unavailable in a region, the load balancer redirects to nodes in other regions.`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`cluster-startup`,children:`Cluster startup`}),`\n`,_jsxs(_components.p,{children:[`Start each node with the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-start#locality`,children:_jsx(_components.code,{children:`--locality`})})}),` flag specifying its region and AZ combination. For example, the following command starts a node in the `,_jsx(_components.code,{children:`west1`}),` AZ of the `,_jsx(_components.code,{children:`us-west`}),` region:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` start`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--locality=region=us-west,zone=west1 `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--advertise-addr=\u003cnode1 `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`internal`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` address`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--join=\u003cnode1 `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`internal`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` address:26257,`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`node2`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` internal`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` address:26257,`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`node3`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` internal`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` address:26257`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--cache=.25 `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--max-sql-memory=.25 `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--background`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configuration`,children:`Configuration`}),`\n`,_jsxs(_components.p,{children:[`With each node started with the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-start#locality`,children:_jsx(_components.code,{children:`--locality`})})}),` flag specifying its region and zone combination, CockroachDB will balance the replicas for a table across the three regions:`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads1.png?fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=e3403abd96ae2eca606ab48bb98b5223`,alt:`Follower reads table replication`,\"data-og-width\":`960`,width:`960`,\"data-og-height\":`540`,height:`540`,\"data-path\":`images/common/topology-patterns/topology_follower_reads1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads1.png?w=280\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=d4e18eeafd5f441de2b45e981520a465 280w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads1.png?w=560\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=1dd3ca79911192f9ced41577bb51d917 560w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads1.png?w=840\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=dfeb044a2bdc6963e473aa58a5ea12b9 840w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=4597a171ebf71a1cada5992b2bff9327 1100w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=9cd4dd7128a1732f0f44cf7533383437 1650w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=52d368960d8559510b9966955592be2c 2500w`}),`\n`,_jsx(Heading,{level:`3`,id:`summary`,children:`Summary`}),`\n`,_jsxs(_components.p,{children:[`You configure your application to use `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads`,children:`follower reads`})}),` by adding an `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`as-of-system-time`,children:_jsx(_components.code,{children:`AS OF SYSTEM TIME`})})}),` clause when reading from the table. With this clause CockroachDB reads slightly historical data from the closest replica so as to avoid being routed to the leaseholder, which may be in an entirely different region. Writes, however, will still leave the region to get consensus for the table.`]}),`\n`,_jsx(Heading,{level:`3`,id:`steps`,children:`Steps`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Create the `,_jsx(_components.code,{children:`postal_codes`}),` table:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` CREATE`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` postal_codes (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` id `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`INT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` PRIMARY KEY`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` code STRING`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Insert data into the `,_jsx(_components.code,{children:`postal_codes`}),` table:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` INSERT INTO`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` postal_codes (ID, code) `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`VALUES`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'10001'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`2`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'10002'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`3`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'10003'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`4`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`,`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'60601'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`5`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`,`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'60602'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`6`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`,`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'60603'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`7`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`,`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'90001'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`8`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`,`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'90002'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`), (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`9`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`,`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'90003'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Decide which type of follower read to perform: exact staleness or bounded staleness. For more information about when to use each type of read, see `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads#when-to-use-exact-staleness-reads`,children:`when to use exact staleness reads`})}),` and `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads#when-to-use-bounded-staleness-reads`,children:`when to use bounded staleness reads`})}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`To use `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads#exact-staleness-reads`,children:`exact staleness follower reads`})}),`, configure your app to use `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`as-of-system-time`,children:_jsx(_components.code,{children:`AS OF SYSTEM TIME`})})}),` with the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsxs(InternalLink,{path:`functions-and-operators#date-and-time-functions`,children:[_jsx(_components.code,{children:`follower_read_timestamp()`}),` function`]})}),` whenever reading from the table:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` SELECT`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` code `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` postal_codes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` AS`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` OF `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`SYSTEM`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TIME`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` follower_read_timestamp`}),_jsx(_components.span,{style:{color:`#9399B2`,\"--shiki-dark\":`#9399B2`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` WHERE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` id `}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`=`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:` 5`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can also set the `,_jsx(_components.code,{children:`AS OF SYSTEM TIME`}),` value for all operations in a read-only transaction:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` BEGIN`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`SET`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TRANSACTION`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` AS`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` OF `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`SYSTEM`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TIME`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` follower_read_timestamp`}),_jsx(_components.span,{style:{color:`#9399B2`,\"--shiki-dark\":`#9399B2`},children:`()`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` SELECT`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` code `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` postal_codes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` WHERE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` id `}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`=`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:` 5`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` SELECT`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` code `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` postal_codes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` WHERE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` id `}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`=`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:` 6`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`COMMIT`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Using the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`set-transaction#use-the-as-of-system-time-option`,children:_jsx(_components.code,{children:`SET TRANSACTION`})})}),` statement as shown in the preceding example will make it easier to use exact staleness follower reads from `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`install-client-drivers`,children:`drivers and ORMs`})}),`.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`To use `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`follower-reads#bounded-staleness-reads`,children:`bounded staleness follower reads`})}),`, configure your app to use `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`as-of-system-time`,children:_jsx(_components.code,{children:`AS OF SYSTEM TIME`})})}),` with the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsxs(InternalLink,{path:`functions-and-operators#date-and-time-functions`,children:[_jsx(_components.code,{children:`with_min_timestamp()`}),` or `,_jsx(_components.code,{children:`with_max_staleness()`}),` function`]})}),` whenever reading from the table. Note that only single-row point reads in single-statement (implicit) transactions are supported.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` code `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` postal_codes `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`AS`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` OF `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`SYSTEM`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TIME`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` with_max_staleness(`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'10s'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`) `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`where`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` id `}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`=`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:` 5`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`characteristics`,children:`Characteristics`}),`\n`,_jsx(Heading,{level:`3`,id:`latency`,children:`Latency`}),`\n`,_jsx(Heading,{level:`4`,id:`reads`,children:`Reads`}),`\n`,_jsx(_components.p,{children:`Reads retrieve historical data from the closest replica and, therefore, never leave the region. This makes read latency very low but slightly stale.`}),`\n`,_jsx(_components.p,{children:`For example, in the following diagram:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`The read request in `,_jsx(_components.code,{children:`us-central`}),` reaches the regional load balancer.`]}),`\n`,_jsx(_components.li,{children:`The load balancer routes the request to a gateway node.`}),`\n`,_jsxs(_components.li,{children:[`The gateway node routes the request to the closest replica for the table. In this case, the replica is `,_jsx(_components.em,{children:`not`}),` the leaseholder.`]}),`\n`,_jsx(_components.li,{children:`The replica retrieves the results as of your preferred staleness interval in the past and returns to the gateway node.`}),`\n`,_jsx(_components.li,{children:`The gateway node returns the results to the client.`}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_reads.png?fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=6589bb12122d56506eb981f2beb321df`,alt:`Follower reads topology reads`,\"data-og-width\":`960`,width:`960`,\"data-og-height\":`540`,height:`540`,\"data-path\":`images/common/topology-patterns/topology_follower_reads_reads.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_reads.png?w=280\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=e87ee3e5b8f8768e94cf7756a5ed6978 280w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_reads.png?w=560\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=c8300e9b8fe5500f0663c5daa1369d3f 560w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_reads.png?w=840\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=f82ebf9470850bb5ae7ddb4a6092a54d 840w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_reads.png?w=1100\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=16d428bb263129ad1f6d45e3a75a6eda 1100w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_reads.png?w=1650\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=407a9fe600d8cc80936211f1e73b7865 1650w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_reads.png?w=2500\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=e346f58f3bd9924b94db0cff755a4d55 2500w`}),`\n`,_jsx(Heading,{level:`4`,id:`writes`,children:`Writes`}),`\n`,_jsx(_components.p,{children:`The replicas for the table are spread across all 3 regions, so writes involve multiple network hops across regions to achieve consensus. This increases write latency significantly.`}),`\n`,_jsx(_components.p,{children:`For example, in the following animation:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`The write request in `,_jsx(_components.code,{children:`us-central`}),` reaches the regional load balancer.`]}),`\n`,_jsx(_components.li,{children:`The load balancer routes the request to a gateway node.`}),`\n`,_jsxs(_components.li,{children:[`The gateway node routes the request to the leaseholder replica for the table in `,_jsx(_components.code,{children:`us-east`}),`.`]}),`\n`,_jsx(_components.li,{children:`Once the leaseholder has appended the write to its Raft log, it notifies its follower replicas.`}),`\n`,_jsx(_components.li,{children:`As soon as one follower has appended the write to its Raft log (and thus a majority of replicas agree based on identical Raft logs), it notifies the leaseholder and the write is committed on the agreeing replicas.`}),`\n`,_jsx(_components.li,{children:`The leaseholder then returns acknowledgement of the commit to the gateway node.`}),`\n`,_jsx(_components.li,{children:`The gateway node returns the acknowledgement to the client.`}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_writes.gif?s=eff1e08de84c1419e996268c780bacc5`,alt:`Follower reads topology writes`,\"data-og-width\":`960`,width:`960`,\"data-og-height\":`540`,height:`540`,\"data-path\":`images/common/topology-patterns/topology_follower_reads_writes.gif`,\"data-optimize\":`true`,\"data-opv\":`3`}),`\n`,_jsx(Heading,{level:`3`,id:`resiliency`,children:`Resiliency`}),`\n`,_jsx(_components.p,{children:`Because this pattern balances the replicas for the table across regions, one entire region can fail without interrupting access to the table:`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_resiliency.png?fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=4a06918931322d43f48fa29bea6e352d`,alt:`Follower reads topology region failure`,\"data-og-width\":`960`,width:`960`,\"data-og-height\":`540`,height:`540`,\"data-path\":`images/common/topology-patterns/topology_follower_reads_resiliency.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_resiliency.png?w=280\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=5d2bab547c1534961d234c8d82fd75f4 280w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_resiliency.png?w=560\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=1acd75571506b96f4063054ee2a68541 560w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_resiliency.png?w=840\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=2e995e489a448d6e55c0091677495e59 840w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_resiliency.png?w=1100\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=aed568c5db537f90ecd2f7903723e835 1100w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_resiliency.png?w=1650\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=ff2962ef0079c7aaad6d85102684c4f3 1650w, https://mintcdn.com/cockroachlabs/iiBVxthghoAOO3UM/images/common/topology-patterns/topology_follower_reads_resiliency.png?w=2500\u0026fit=max\u0026auto=format\u0026n=iiBVxthghoAOO3UM\u0026q=85\u0026s=5ec7e5544e747eb4bcd9d39ba383fbae 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`see-also`,children:`See also`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`multiregion-overview`,children:`Multi-Region Capabilities Overview`})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`choosing-a-multi-region-configuration`,children:`How to Choose a Multi-Region Configuration`})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsxs(InternalLink,{path:`multiregion-survival-goals#when-to-use-zone-vs-region-survival-goals`,children:[`When to Use `,_jsx(_components.code,{children:`ZONE`}),` vs. `,_jsx(_components.code,{children:`REGION`}),` Survival Goals`]})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsxs(InternalLink,{path:`table-localities#when-to-use-regional-vs-global-tables`,children:[`When to Use `,_jsx(_components.code,{children:`REGIONAL`}),` vs. `,_jsx(_components.code,{children:`GLOBAL`}),` Tables`]})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`multiregion-overview#secondary-regions`,children:`Secondary regions`})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`alter-database#set-secondary-region`,children:_jsx(_components.code,{children:`ALTER DATABASE ... SET SECONDARY REGION`})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`alter-database#drop-secondary-region`,children:_jsx(_components.code,{children:`ALTER DATABASE ... DROP SECONDARY REGION`})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`topology-patterns`,children:`Topology Patterns Overview`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Single-region patterns`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`topology-basic-production`,children:`Basic Production`})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Multi-region patterns`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsxs(InternalLink,{path:`regional-tables`,children:[_jsx(_components.code,{children:`REGIONAL`}),` Tables`]})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsxs(InternalLink,{path:`global-tables`,children:[_jsx(_components.code,{children:`GLOBAL`}),` Tables`]})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`topology-follower-reads`,children:`Follower Reads`})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`topology-follow-the-workload`,children:`Follow-the-Workload`})}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{InternalLink,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}},"config":{},"pageMetadata":{"title":"Follower Reads Topology","old_description":"Guidance on using the follower reads topology in a multi-region deployment.","description":null,"href":"/docs/stable/topology-follower-reads"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[148,586,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Before you begin","slug":"before-you-begin","depth":2,"children":[{"title":"Fundamentals","slug":"fundamentals","depth":3,"children":[]},{"title":"Cluster setup","slug":"cluster-setup","depth":3,"children":[]},{"title":"Hardware","slug":"hardware","depth":4,"children":[]},{"title":"Cluster startup","slug":"cluster-startup","depth":4,"children":[]}]},{"title":"Configuration","slug":"configuration","depth":2,"children":[{"title":"Summary","slug":"summary","depth":3,"children":[]},{"title":"Steps","slug":"steps","depth":3,"children":[]}]},{"title":"Characteristics","slug":"characteristics","depth":2,"children":[{"title":"Latency","slug":"latency","depth":3,"children":[]},{"title":"Reads","slug":"reads","depth":4,"children":[]},{"title":"Writes","slug":"writes","depth":4,"children":[]},{"title":"Resiliency","slug":"resiliency","depth":3,"children":[]}]},{"title":"See also","slug":"see-also","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cockroachlabs/4695317e415d4eba/kapa.js","/_mintlify/custom/cockroachlabs/40fb45a3cfe42c92/copy-code-prompt.js","/_mintlify/custom/cockroachlabs/3f343c9e8c40397a/collapse-nav.js"],"subdomain":"cockroachlabs","siteName":"CockroachDB","title":"Follower Reads Topology - CockroachDB","navMaps":{"firstHrefInVersion":{"v26.4":{"href":"/docs/stable/topology-follower-reads","matchLevel":0},"v26.3":{"href":"/docs/v26.3/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v26.2":{"href":"/docs/v26.2/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v26.1":{"href":"/docs/v26.1/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v25.4":{"href":"/docs/v25.4/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v25.3":{"href":"/docs/v25.3/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v25.2":{"href":"/docs/v25.2/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v25.1":{"href":"/docs/v25.1/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v24.3":{"href":"/docs/v24.3/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v24.1":{"href":"/docs/v24.1/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v23.2":{"href":"/docs/v23.2/topology-follower-reads","matchLevel":1,"canonicalOverride":true},"v23.1":{"href":"/docs/v23.1/topology-follower-reads","matchLevel":1,"canonicalOverride":true}},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T15:56:09.156Z","originalFileLocation":"docs/stable/topology-follower-reads.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"CockroachDB\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Follower Reads Topology - CockroachDB\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CockroachDB\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cockroachlabs.mintlify.site/_mintlify/api/og/v2?division=Multi-Region+for+Self-Hosted+Deployments\u0026amp;title=Follower+Reads+Topology\u0026amp;theme=7628870a42004e67b5b3df3d\u0026amp;signature=c3e4b2a38b9ccf8b274a8b919212998986f3a5161a9a36f408548a5aec74992e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Follower Reads Topology - CockroachDB\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cockroachlabs.mintlify.site/_mintlify/api/og/v2?division=Multi-Region+for+Self-Hosted+Deployments\u0026amp;title=Follower+Reads+Topology\u0026amp;theme=7628870a42004e67b5b3df3d\u0026amp;signature=c3e4b2a38b9ccf8b274a8b919212998986f3a5161a9a36f408548a5aec74992e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CockroachDB\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9059FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/stable/topology-follower-reads.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cockroachlabs.com/#organization\",\"name\":\"CockroachDB\",\"url\":\"https://docs.cockroachlabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cockroachlabs/4WvUnbVuGZfqM4kW/images/CockroachLabs_Wordmark_Black.png?fit=max\u0026auto=format\u0026n=4WvUnbVuGZfqM4kW\u0026q=85\u0026s=54ccae625c9986bf1df8ddc7b2c571f0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cockroachlabs.com#website\",\"name\":\"CockroachDB\",\"url\":\"https://docs.cockroachlabs.com\",\"publisher\":{\"@id\":\"https://docs.cockroachlabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads#webpage\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads\",\"name\":\"Follower Reads Topology\",\"dateModified\":\"2026-11-06T15:56:09.156Z\",\"isPartOf\":{\"@id\":\"https://docs.cockroachlabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Self-Hosted Deployments\",\"item\":\"https://docs.cockroachlabs.com/docs/stable/recommended-production-settings\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multi-Region for Self-Hosted Deployments\",\"item\":\"https://docs.cockroachlabs.com/docs/stable/topology-patterns\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Follower Reads Topology\",\"item\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads#article\",\"headline\":\"Follower Reads Topology\",\"name\":\"Follower Reads Topology\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/topology-follower-reads#webpage\"},\"dateModified\":\"2026-11-06T15:56:09.156Z\",\"publisher\":{\"@id\":\"https://docs.cockroachlabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cockroachlabs.com#website\"}}]}\u003c/script>","siteName":"CockroachDB","nav":{"global":{"anchors":[{"anchor":"University","icon":"graduation-cap","href":"https://learn.cockroachlabs.com/"}]},"products":[{"product":"Cockroach Continuum Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/cockroachlabs/images/continuum/cockroachlabs-symbol.svg","description":"The agentic database cloud","pages":[{"title":"Cockroach Continuum Cloud","href":"/docs/continuum"}]},{"product":"CockroachDB","icon":"database","description":"Distributed SQL database","versions":[{"version":"v26.4","default":true,"tag":"Stable","tabs":[{"tab":"Docs","icon":"book-open","pages":[{"title":"CockroachDB Docs","sidebarTitle":"Docs Home","href":"/docs/stable"},{"group":"Get Started","pages":[{"group":"Install CockroachDB","expanded":true,"pages":[{"title":"Install CockroachDB on Mac","href":"/docs/stable/install-cockroachdb-mac"},{"title":"Install CockroachDB on Linux","href":"/docs/stable/install-cockroachdb-linux"},{"title":"Install a FIPS-ready CockroachDB Runtime","href":"/docs/stable/fips"},{"title":"Install CockroachDB on Windows","href":"/docs/stable/install-cockroachdb-windows"}]},{"group":"Develop with CockroachDB","expanded":true,"pages":[{"title":"Developer Basics","href":"/docs/stable/developer-basics"},{"group":"JavaScript/TypeScript","expanded":true,"pages":[{"title":"Build a Simple CRUD Node.js App with CockroachDB and the node-postgres Driver","href":"/docs/stable/build-a-nodejs-app-with-cockroachdb"},{"title":"Build a Node.js App with CockroachDB and Sequelize","href":"/docs/stable/build-a-nodejs-app-with-cockroachdb-sequelize"},{"title":"Build a Simple CRUD Node.js App with CockroachDB and Knex.js","href":"/docs/stable/build-a-nodejs-app-with-cockroachdb-knexjs"},{"title":"Build a Simple CRUD Node.js App with CockroachDB and Prisma","href":"/docs/stable/build-a-nodejs-app-with-cockroachdb-prisma"},{"title":"Build a TypeScript App with CockroachDB and TypeORM","href":"/docs/stable/build-a-typescript-app-with-cockroachdb"}]},{"group":"Python","expanded":true,"pages":[{"title":"Build a Python App with CockroachDB and Psycopg 3","href":"/docs/stable/build-a-python-app-with-cockroachdb-psycopg3"},{"title":"Build a Python App with CockroachDB and psycopg2","href":"/docs/stable/build-a-python-app-with-cockroachdb"},{"title":"Build a Simple CRUD Python App with CockroachDB and SQLAlchemy","href":"/docs/stable/build-a-python-app-with-cockroachdb-sqlalchemy"},{"title":"Build a Python App with CockroachDB and Django","href":"/docs/stable/build-a-python-app-with-cockroachdb-django"},{"title":"Build a Python App with CockroachDB and asyncpg","href":"/docs/stable/build-a-python-app-with-cockroachdb-asyncpg"}]},{"group":"Golang","expanded":true,"pages":[{"title":"Build a Simple CRUD Go App with CockroachDB and the Go pgx Driver","href":"/docs/stable/build-a-go-app-with-cockroachdb"},{"title":"Build a Go App with CockroachDB and GORM","href":"/docs/stable/build-a-go-app-with-cockroachdb-gorm"},{"title":"Build a Go App with CockroachDB the Go pq Driver","href":"/docs/stable/build-a-go-app-with-cockroachdb-pq"},{"title":"Build a Go App with CockroachDB and upper/db","href":"/docs/stable/build-a-go-app-with-cockroachdb-upperdb"}]},{"group":"Java","expanded":true,"pages":[{"title":"Build a Simple CRUD Java App with CockroachDB and JDBC","href":"/docs/stable/build-a-java-app-with-cockroachdb"},{"title":"Build a Java App with CockroachDB and Hibernate","href":"/docs/stable/build-a-java-app-with-cockroachdb-hibernate"},{"title":"Build a Java App with CockroachDB and jOOQ","href":"/docs/stable/build-a-java-app-with-cockroachdb-jooq"},{"title":"Build a Spring App with CockroachDB and MyBatis","href":"/docs/stable/build-a-spring-app-with-cockroachdb-mybatis"}]},{"group":"Ruby","expanded":true,"pages":[{"title":"Build a Ruby App with CockroachDB and the Ruby pg Driver","href":"/docs/stable/build-a-ruby-app-with-cockroachdb"},{"title":"Build a Ruby App with CockroachDB and Active Record","href":"/docs/stable/build-a-ruby-app-with-cockroachdb-activerecord"}]},{"title":"Build a C# App with CockroachDB and the .NET Npgsql Driver","sidebarTitle":"C# (.NET)","href":"/docs/stable/build-a-csharp-app-with-cockroachdb"},{"title":"Build a Rust App with CockroachDB and the Rust-Postgres Driver","sidebarTitle":"Rust","href":"/docs/stable/build-a-rust-app-with-cockroachdb"},{"title":"Build a GraphQL Application Using Hasura","sidebarTitle":"Hasura (GraphQL)","href":"/docs/stable/hasura-getting-started"}]},{"group":"Standard Examples","expanded":true,"pages":[{"title":"Create and Deploy an AWS Lambda Function Built on CockroachDB","sidebarTitle":"AWS Lambda","href":"/docs/stable/deploy-lambda-function"},{"title":"Deploy a CockroachDB Cloud Application with Google Cloud Run","sidebarTitle":"Google Cloud Run","href":"/docs/stable/deploy-app-gcr"},{"title":"Deploy a Netlify App Built on CockroachDB","sidebarTitle":"Netlify","href":"/docs/stable/deploy-app-netlify"},{"title":"Deploy a Web App Built on CockroachDB with Vercel","sidebarTitle":"Vercel","href":"/docs/stable/deploy-app-vercel"},{"title":"Serverless Function Best Practices","href":"/docs/stable/serverless-function-best-practices"}]},{"title":"MovR","href":"/docs/stable/movr"}]},{"group":"CockroachDB and AI","pages":[{"title":"CockroachDB and AI","sidebarTitle":"Overview","href":"/docs/stable/cockroachdb-and-ai"},{"title":"Agent Skills for CockroachDB","href":"/docs/stable/agent-skills"},{"group":"CockroachDB MCP Server","expanded":true,"pages":[{"title":"CockroachDB MCP Server","sidebarTitle":"Overview","href":"/docs/stable/cockroachdb-mcp-server"},{"title":"Install, Configure, and Connect to the CockroachDB MCP Server","sidebarTitle":"Install, Configure, and Connect","href":"/docs/stable/install-cockroachdb-mcp-server"},{"title":"CockroachDB MCP Server Reference","sidebarTitle":"Self-hosted MCP Server Reference","href":"/docs/stable/cockroachdb-mcp-server-reference"}]},{"title":"CockroachDB Docs MCP Server","sidebarTitle":"Docs MCP Server","href":"/docs/stable/docs-mcp-integration"}]},{"group":"Feature Overview","pages":[{"group":"CockroachDB Basics","expanded":true,"pages":[{"title":"Why CockroachDB?","href":"/docs/stable/why-cockroachdb"},{"title":"Replication and Rebalancing","sidebarTitle":"Replication \u0026 Rebalancing","href":"/docs/stable/demo-replication-and-rebalancing"},{"title":"CockroachDB Resilience Demo","sidebarTitle":"CockroachDB Resilience","href":"/docs/stable/demo-cockroachdb-resilience"},{"title":"Serializable Transactions","href":"/docs/stable/demo-serializable"},{"title":"Multi-Active Availability","href":"/docs/stable/multi-active-availability"}]},{"group":"CockroachDB SQL","expanded":true,"pages":[{"title":"PostgreSQL Compatibility","href":"/docs/stable/postgresql-compatibility"},{"title":"SQL Feature Support in CockroachDB","sidebarTitle":"SQL Features","href":"/docs/stable/sql-feature-support"},{"title":"SQL FAQs","href":"/docs/stable/sql-faqs"}]}]},{"group":"Data Resilience","pages":[{"title":"Data Resilience","sidebarTitle":"Overview","href":"/docs/stable/data-resilience"},{"title":"Disaster Recovery Overview","sidebarTitle":"Disaster Recovery","href":"/docs/stable/disaster-recovery-overview"}]},{"group":"Connect to an Application","pages":[{"title":"Install a Driver or ORM Framework","href":"/docs/stable/install-client-drivers"},{"title":"Connect to a CockroachDB Cluster","sidebarTitle":"Connect to a Cluster","href":"/docs/stable/connect-to-the-database"},{"title":"Client Connection Parameters","href":"/docs/stable/connection-parameters"},{"title":"Connection Pooling","href":"/docs/stable/connection-pooling"}]},{"group":"Self-Hosted Deployments","pages":[{"title":"Production Checklist","href":"/docs/stable/recommended-production-settings"},{"title":"Deployment \u0026 Operations Skills Taxonomy","sidebarTitle":"Deployment and Operations Skills Taxonomy","href":"/docs/stable/deployment-operations-skills-taxonomy"},{"group":"Deploy Locally","expanded":true,"pages":[{"group":"Deploy from Binary","expanded":true,"pages":[{"title":"Deploy a Local Cluster from Binary (Secure)","href":"/docs/stable/secure-a-cluster"},{"title":"Deploy a Local Cluster from Binary (Insecure)","href":"/docs/stable/start-a-local-cluster"}]},{"title":"Deploy a Local Cluster in Docker (Insecure)","href":"/docs/stable/start-a-local-cluster-in-docker"},{"title":"Simulate a Multi-Region Cluster on localhost (Insecure)","sidebarTitle":"Simulate a Multi-Region Cluster Locally","href":"/docs/stable/simulate-a-multi-region-cluster-on-localhost"}]},{"group":"Deploy Manually","expanded":true,"pages":[{"title":"Manual Deployment","sidebarTitle":"Overview","href":"/docs/stable/manual-deployment"},{"title":"Deploy CockroachDB On-Premises","sidebarTitle":"Deploy On-Premises","href":"/docs/stable/deploy-cockroachdb-on-premises"},{"title":"Deploy CockroachDB on AWS EC2","sidebarTitle":"Deploy on AWS","href":"/docs/stable/deploy-cockroachdb-on-aws"},{"title":"Deploy CockroachDB on Microsoft Azure","sidebarTitle":"Deploy on Azure","href":"/docs/stable/deploy-cockroachdb-on-microsoft-azure"},{"title":"Deploy CockroachDB on Google Cloud Platform GCE","sidebarTitle":"Deploy on Google Cloud Platform GCE","href":"/docs/stable/deploy-cockroachdb-on-google-cloud-platform"},{"title":"Deploy CockroachDB on Digital Ocean","sidebarTitle":"Deploy on Digital Ocean","href":"/docs/stable/deploy-cockroachdb-on-digital-ocean"}]},{"group":"Deploy in Kubernetes with CockroachDB Operator","expanded":true,"pages":[{"title":"CockroachDB Operator Overview","sidebarTitle":"Overview","href":"/docs/stable/cockroachdb-operator-overview"},{"title":"Deploy CockroachDB with the CockroachDB Operator","sidebarTitle":"CockroachDB Operator Deployment Guide","href":"/docs/stable/deploy-cockroachdb-with-cockroachdb-operator"},{"group":"Migrate from Other Kubernetes Deployments","expanded":true,"pages":[{"title":"Migrate from Helm StatefulSet","href":"/docs/stable/migrate-cockroachdb-kubernetes-helm"},{"title":"Migrate from the Public Operator","sidebarTitle":"Migrate from Public operator","href":"/docs/stable/migrate-cockroachdb-kubernetes-operator"}]},{"group":"Operate CockroachDB with Kubernetes","expanded":true,"pages":[{"title":"Pod Scheduling with the CockroachDB Operator","sidebarTitle":"Pod Scheduling","href":"/docs/stable/schedule-cockroachdb-operator"},{"title":"Resource Management with the CockroachDB Operator","sidebarTitle":"Resource Management","href":"/docs/stable/configure-cockroachdb-operator"},{"title":"Certificate Management with the CockroachDB Operator","sidebarTitle":"Certificate Management","href":"/docs/stable/secure-cockroachdb-operator"},{"title":"Cluster Scaling with the CockroachDB Operator","sidebarTitle":"Cluster Scaling","href":"/docs/stable/scale-cockroachdb-operator"},{"title":"Cluster Monitoring with the CockroachDB Operator","sidebarTitle":"Cluster Monitoring","href":"/docs/stable/monitor-cockroachdb-operator"},{"title":"Upgrade a cluster in Kubernetes with the CockroachDB Operator","sidebarTitle":"Cluster Upgrades","href":"/docs/stable/upgrade-cockroachdb-operator"},{"title":"Override Deployment Templates with the CockroachDB Operator","sidebarTitle":"Override Templates","href":"/docs/stable/override-templates-cockroachdb-operator"},{"title":"Performance with the CockroachDB Operator","sidebarTitle":"Kubernetes Performance","href":"/docs/stable/cockroachdb-operator-performance"}]}]},{"group":"Deploy on Kubernetes with Legacy Technologies","expanded":true,"pages":[{"title":"Kubernetes Overview","sidebarTitle":"Overview","href":"/docs/stable/kubernetes-overview"},{"title":"Legacy Kubernetes Deployment Deprecation Notice","sidebarTitle":"Legacy Kubernetes Deployment Deprecation Notice","href":"/docs/stable/kubernetes-deprecation-notice"},{"title":"Deploy CockroachDB in a Single Kubernetes Cluster","href":"/docs/stable/deploy-cockroachdb-with-kubernetes"},{"title":"Deploy CockroachDB in a Single Kubernetes Cluster (Insecure)","href":"/docs/stable/deploy-cockroachdb-with-kubernetes-insecure"},{"title":"Deploy CockroachDB on Red Hat OpenShift","sidebarTitle":"OpenShift Deployment","href":"/docs/stable/deploy-cockroachdb-with-kubernetes-openshift"},{"title":"Orchestrate CockroachDB Across Multiple Kubernetes Clusters","sidebarTitle":"Multi-Cluster Deployment","href":"/docs/stable/orchestrate-cockroachdb-with-kubernetes-multi-cluster"},{"group":"Operate on Kubernetes","expanded":true,"pages":[{"title":"Pod Scheduling","href":"/docs/stable/schedule-cockroachdb-kubernetes"},{"title":"Resource Management","href":"/docs/stable/configure-cockroachdb-kubernetes"},{"title":"Certificate Management","href":"/docs/stable/secure-cockroachdb-kubernetes"},{"title":"Cluster Scaling","href":"/docs/stable/scale-cockroachdb-kubernetes"},{"title":"Cluster Monitoring","href":"/docs/stable/monitor-cockroachdb-kubernetes"},{"title":"Upgrade a cluster in Kubernetes","sidebarTitle":"Cluster Upgrades","href":"/docs/stable/upgrade-cockroachdb-kubernetes"},{"title":"CockroachDB Performance on Kubernetes","sidebarTitle":"Kubernetes Performance","href":"/docs/stable/kubernetes-performance"}]}]},{"group":"Multi-Region for Self-Hosted Deployments","expanded":true,"pages":[{"title":"Topology Patterns Overview","href":"/docs/stable/topology-patterns"},{"title":"Basic Production Topology","description":null,"href":"/docs/stable/topology-basic-production"},{"title":"Follower Reads Topology","href":"/docs/stable/topology-follower-reads"},{"title":"Follow-the-Workload Topology","description":null,"href":"/docs/stable/topology-follow-the-workload"},{"title":"Regional Tables","href":"/docs/stable/regional-tables"},{"title":"Global Tables","href":"/docs/stable/global-tables"}]},{"group":"Security","expanded":true,"pages":[{"group":"Certificates","expanded":true,"pages":[{"title":"Use the CockroachDB CLI to provision a development cluster","href":"/docs/stable/manage-certs-cli"},{"title":"Manage PKI certificates with HashiCorp Vault","href":"/docs/stable/manage-certs-vault"},{"title":"Create Security Certificates using OpenSSL","href":"/docs/stable/create-security-certificates-openssl"},{"title":"Advanced Public Key Infrastructure (PKI) Certificate Scenarios","href":"/docs/stable/create-security-certificates-custom-ca"},{"title":"Using Online Certificate Status Protocol (OCSP) with CockroachDB","sidebarTitle":"Use Online Certificate Status Protocol (OCSP)","href":"/docs/stable/manage-certs-revoke-ocsp"},{"title":"Certificate-based authentication using multiple values from the X.509 Subject field","sidebarTitle":"Certificate-based authentication using multiple values from the X.509 SUBJECT field","href":"/docs/stable/certificate-based-authentication-using-the-x509-subject-field"}]},{"title":"Authenticate to CockroachDB Self-Hosted Clusters","sidebarTitle":"Authentication","href":"/docs/stable/authentication"},{"title":"Manage Encryption for CockroachDB Self-Hosted Clusters","sidebarTitle":"Encryption","href":"/docs/stable/encryption"},{"title":"Manage Cluster User Authorization","sidebarTitle":"Authorization","href":"/docs/stable/authorization"},{"title":"Table-based SQL Audit Logging","href":"/docs/stable/sql-audit-logging"},{"title":"Role-based SQL Audit Logging","href":"/docs/stable/role-based-audit-logging"},{"title":"Configure LDAP Authentication","sidebarTitle":"LDAP Authentication","href":"/docs/stable/ldap-authentication"},{"title":"Configure LDAP Authorization","sidebarTitle":"LDAP Authorization","href":"/docs/stable/ldap-authorization"},{"title":"GSSAPI Authentication (Enterprise)","sidebarTitle":"GSSAPI Authentication","href":"/docs/stable/gssapi_authentication"},{"title":"Cluster Single Sign-on (SSO) using JSON Web Tokens (JWTs)","sidebarTitle":"Cluster SSO using JWT","href":"/docs/stable/sso-sql"},{"title":"SASL OAUTHBEARER (OAuth 2.0) Authentication for SQL Clients","sidebarTitle":"OAuth authentication for SQL","href":"/docs/stable/oauth-authentication"},{"title":"Configure JWT Authorization","sidebarTitle":"JWT Authorization","href":"/docs/stable/jwt-authorization"},{"title":"Single Sign-on (SSO) for DB Console","sidebarTitle":"DB Console SSO","href":"/docs/stable/sso-db-console"},{"title":"Configure OIDC Authorization for DB Console","sidebarTitle":"OIDC Authorization","href":"/docs/stable/oidc-authorization"},{"title":"Rotate Security Certificates","href":"/docs/stable/rotate-certificates"},{"title":"Use HashiCorp Vault's Dynamic Secrets","sidebarTitle":"Use Hashicorp Vault's Dynamic Secrets","href":"/docs/stable/vault-db-secrets-tutorial"}]},{"group":"Monitoring and Alerting","expanded":true,"pages":[{"title":"Monitoring and Alerting","sidebarTitle":"Overview","href":"/docs/stable/monitoring-and-alerting"},{"title":"Common Issues to Monitor","href":"/docs/stable/common-issues-to-monitor"},{"title":"Enable the Node Map","href":"/docs/stable/enable-node-map"},{"title":"Prometheus Endpoint","href":"/docs/stable/prometheus-endpoint"},{"title":"Monitor CockroachDB with Prometheus","sidebarTitle":"Use Prometheus and Alertmanager","href":"/docs/stable/monitor-cockroachdb-with-prometheus"},{"title":"Essential Metrics for CockroachDB Self-Hosted Deployments","sidebarTitle":"Essential Metrics for CockroachDB self-hosted Deployments","href":"/docs/stable/essential-metrics-self-hosted"},{"title":"Essential Alerts for CockroachDB Self-Hosted Deployments","sidebarTitle":"Essential Alerts for CockroachDB self-hosted Deployments","href":"/docs/stable/essential-alerts-self-hosted"}]},{"group":"Administration","expanded":true,"pages":[{"title":"DB Console Overview","href":"/docs/stable/ui-overview"},{"title":"Cluster Overview Page","href":"/docs/stable/ui-cluster-overview-page"},{"group":"Metrics Dashboards","expanded":true,"pages":[{"title":"Overview Dashboard","sidebarTitle":"Overview","href":"/docs/stable/ui-overview-dashboard"},{"title":"Hardware Dashboard","sidebarTitle":"Hardware","href":"/docs/stable/ui-hardware-dashboard"},{"title":"Runtime Dashboard","sidebarTitle":"Runtime","href":"/docs/stable/ui-runtime-dashboard"},{"title":"Networking Dashboard","sidebarTitle":"Networking","href":"/docs/stable/ui-networking-dashboard"},{"title":"SQL Dashboard","sidebarTitle":"SQL","href":"/docs/stable/ui-sql-dashboard"},{"title":"Storage Dashboard","sidebarTitle":"Storage","href":"/docs/stable/ui-storage-dashboard"},{"title":"Replication Dashboard","sidebarTitle":"Replication","href":"/docs/stable/ui-replication-dashboard"},{"title":"Distributed Dashboard","sidebarTitle":"Distributed","href":"/docs/stable/ui-distributed-dashboard"},{"title":"Queues Dashboard","sidebarTitle":"Queues","href":"/docs/stable/ui-queues-dashboard"},{"title":"Slow Requests Dashboard","sidebarTitle":"Slow Requests","href":"/docs/stable/ui-slow-requests-dashboard"},{"title":"Changefeeds Dashboard","sidebarTitle":"Changefeeds","href":"/docs/stable/ui-cdc-dashboard"},{"title":"Overload Dashboard","sidebarTitle":"Overload","href":"/docs/stable/ui-overload-dashboard"},{"title":"TTL Dashboard","sidebarTitle":"TTL","href":"/docs/stable/ui-ttl-dashboard"},{"title":"Physical Cluster Replication Dashboard","sidebarTitle":"Physical Cluster Replication","href":"/docs/stable/ui-physical-cluster-replication-dashboard"},{"title":"Logical Data Replication Dashboard","sidebarTitle":"Logical Data Replication","href":"/docs/stable/ui-logical-data-replication-dashboard"},{"title":"Custom Chart Debug Page","href":"/docs/stable/ui-custom-chart-debug-page"}]},{"title":"Databases Page","href":"/docs/stable/ui-databases-page"},{"title":"Sessions Page","href":"/docs/stable/ui-sessions-page"},{"title":"Statements Page","href":"/docs/stable/ui-statements-page"},{"title":"Transactions Page","href":"/docs/stable/ui-transactions-page"},{"title":"Insights Page","href":"/docs/stable/ui-insights-page"},{"title":"Network Page","href":"/docs/stable/ui-network-latency-page"},{"title":"Top Ranges Page","href":"/docs/stable/ui-top-ranges-page"},{"title":"Jobs Page","href":"/docs/stable/ui-jobs-page"},{"title":"Schedules Page","href":"/docs/stable/ui-schedules-page"},{"title":"Advanced Debug Page","href":"/docs/stable/ui-debug-pages"},{"title":"Generate Debug Zip","href":"/docs/stable/ui-generate-debug-zip"},{"title":"Key Visualizer","href":"/docs/stable/ui-key-visualizer"},{"title":"WAL Failover","href":"/docs/stable/wal-failover"}]},{"group":"Backups and Restores","expanded":true,"pages":[{"title":"Backup and Restore Overview","sidebarTitle":"Overview","href":"/docs/stable/backup-and-restore-overview"},{"title":"Take Full and Incremental Backups","sidebarTitle":"Full and Incremental Backups","href":"/docs/stable/take-full-and-incremental-backups"},{"title":"Take Backups with Revision History and Restore from a Point-in-time","sidebarTitle":"Backups with Revision History and Point-in-time Restore","href":"/docs/stable/take-backups-with-revision-history-and-restore-from-a-point-in-time"},{"title":"Take and Restore Encrypted Backups","sidebarTitle":"Encrypted Backup and Restore","href":"/docs/stable/take-and-restore-encrypted-backups"},{"title":"Take Locality-restricted Backups","sidebarTitle":"Locality-restricted Backup Execution","href":"/docs/stable/take-locality-restricted-backups"},{"title":"Take and Restore Locality-aware Backups","sidebarTitle":"Locality-aware Backup and Restore","href":"/docs/stable/take-and-restore-locality-aware-backups"},{"title":"Manage a Backup Schedule","sidebarTitle":"Scheduled Backups","href":"/docs/stable/manage-a-backup-schedule"},{"title":"Backup Validation","href":"/docs/stable/backup-validation"},{"title":"Expire Past Backups","href":"/docs/stable/expire-past-backups"},{"title":"Backup and Restore Monitoring","href":"/docs/stable/backup-and-restore-monitoring"}]},{"group":"File Storage","expanded":true,"pages":[{"title":"Use Cloud Storage","sidebarTitle":"Cloud Storage","href":"/docs/stable/use-cloud-storage"},{"title":"Cloud Storage Authentication","href":"/docs/stable/cloud-storage-authentication"},{"title":"Use Userfile Storage","sidebarTitle":"Userfile Storage","href":"/docs/stable/use-userfile-storage"},{"title":"Use a Local File Server","sidebarTitle":"Local File Server","href":"/docs/stable/use-a-local-file-server"}]},{"group":"Cluster Maintenance","expanded":true,"pages":[{"title":"Upgrade CockroachDB self-hosted","sidebarTitle":"Upgrade CockroachDB","href":"/docs/stable/upgrade-cockroach-version"},{"title":"Disaster Recovery Planning","href":"/docs/stable/disaster-recovery-planning"},{"title":"Restoring Backups Across Versions","href":"/docs/stable/restoring-backups-across-versions"},{"title":"Manage Long-Running Queries","href":"/docs/stable/manage-long-running-queries"},{"title":"Node Shutdown","href":"/docs/stable/node-shutdown"}]},{"group":"Logs","expanded":true,"pages":[{"title":"Logging Overview","sidebarTitle":"Overview","href":"/docs/stable/logging-overview"},{"title":"Configure Logs","href":"/docs/stable/configure-logs"},{"title":"Logging Use Cases","href":"/docs/stable/logging-use-cases"},{"title":"Log SQL Activity to Datadog","href":"/docs/stable/log-sql-activity-to-datadog"},{"title":"Logging Best Practices","href":"/docs/stable/logging-best-practices"},{"title":"Critical Log Messages","href":"/docs/stable/critical-log-messages"}]},{"title":"Cluster API v2.0","sidebarTitle":"Cluster API","href":"/docs/stable/cluster-api"}]},{"group":"Schema Design","pages":[{"title":"Database Schemas","href":"/docs/stable/schema-design-overview"},{"title":"Computed Columns","href":"/docs/stable/computed-columns"},{"title":"Column Families","href":"/docs/stable/column-families"},{"title":"Scale to Multiple Regions","href":"/docs/stable/multiregion-scale-application"},{"group":"Indexes","expanded":true,"pages":[{"title":"Secondary Indexes","href":"/docs/stable/schema-design-indexes"},{"title":"Index a Subset of Rows with Partial Indexes","sidebarTitle":"Partial Indexes","href":"/docs/stable/partial-indexes"},{"title":"Index Sequential Keys with Hash-sharded Indexes","sidebarTitle":"Hash-sharded Indexes","href":"/docs/stable/hash-sharded-indexes"},{"title":"Generalized Inverted Indexes","href":"/docs/stable/inverted-indexes"},{"title":"Full-Text Search","href":"/docs/stable/full-text-search"},{"title":"Trigram Indexes","href":"/docs/stable/trigram-indexes"},{"title":"Expression Indexes","href":"/docs/stable/expression-indexes"},{"title":"Spatial Indexes","href":"/docs/stable/spatial-indexes"},{"title":"Vector Indexes","href":"/docs/stable/vector-indexes"}]},{"group":"Update a Database Schema","expanded":true,"pages":[{"title":"Online Schema Changes","href":"/docs/stable/online-schema-changes"},{"title":"Migrate CockroachDB Schemas with Alembic","sidebarTitle":"Use Alembic","href":"/docs/stable/alembic"},{"title":"Migrate CockroachDB Schemas with Flyway","sidebarTitle":"Use Flyway","href":"/docs/stable/flyway"},{"title":"Migrate CockroachDB Schemas with Liquibase","sidebarTitle":"Use Liquibase","href":"/docs/stable/liquibase"}]}]},{"group":"Reads and Writes","pages":[{"title":"Reads and Writes in CockroachDB","sidebarTitle":"Overview","href":"/docs/stable/architecture/reads-and-writes-overview"},{"group":"Read Data","expanded":true,"pages":[{"title":"Reusable Views","href":"/docs/stable/views"},{"title":"Subqueries","href":"/docs/stable/subqueries"},{"title":"Temporary Tables","href":"/docs/stable/temporary-tables"},{"title":"Paginate Results","href":"/docs/stable/pagination"},{"title":"Follower Reads","href":"/docs/stable/follower-reads"},{"title":"AS OF SYSTEM TIME","sidebarTitle":"AS OF SYSTEM TIME","href":"/docs/stable/as-of-system-time"},{"title":"Query Spatial Data","href":"/docs/stable/query-spatial-data"}]},{"group":"Write Data","expanded":true,"pages":[{"title":"Bulk-update Data","href":"/docs/stable/bulk-update-data"},{"title":"Bulk-delete Data","href":"/docs/stable/bulk-delete-data"},{"title":"Batch Delete Expired Data with Row-Level TTL","href":"/docs/stable/row-level-ttl"}]},{"group":"Transactions","expanded":true,"pages":[{"title":"Transactions","sidebarTitle":"Overview","href":"/docs/stable/transactions"},{"title":"Advanced Client-side Transaction Retries","href":"/docs/stable/advanced-client-side-transaction-retries"},{"title":"Life of a Distributed Transaction","href":"/docs/stable/architecture/life-of-a-distributed-transaction"},{"title":"Read Committed Transactions","href":"/docs/stable/read-committed"}]},{"title":"Test Your Application Locally","href":"/docs/stable/local-testing"},{"url":"https://www.cockroachlabs.com/docs/tutorials/sql-playground","title":"SQL Playground","href":"/links/tutorials/sql-playground"},{"group":"Database Management Tools","expanded":true,"pages":[{"title":"Visualize CockroachDB Schemas with DBeaver","sidebarTitle":"DBeaver GUI","href":"/docs/stable/dbeaver"},{"title":"Use IntelliJ IDEA with CockroachDB","sidebarTitle":"IntelliJ IDEA","href":"/docs/stable/intellij-idea"}]}]},{"group":"Stream Data","pages":[{"title":"Change Data Capture Overview","href":"/docs/stable/change-data-capture-overview"},{"group":"Get Started with Changefeeds","expanded":true,"pages":[{"title":"Create and Configure Changefeeds","href":"/docs/stable/create-and-configure-changefeeds"},{"title":"Changefeed Best Practices","href":"/docs/stable/changefeed-best-practices"},{"group":"Changefeed Messages","expanded":true,"pages":[{"title":"Changefeed Messages","sidebarTitle":"Overview","href":"/docs/stable/changefeed-messages"},{"title":"Changefeed Message Envelope","sidebarTitle":"Message Envelope","href":"/docs/stable/changefeed-message-envelopes"}]},{"title":"Changefeed Sinks","href":"/docs/stable/changefeed-sinks"},{"title":"Changefeed Examples","href":"/docs/stable/changefeed-examples"}]},{"group":"Monitor Changefeeds","expanded":true,"pages":[{"title":"Monitor and Debug Changefeeds","sidebarTitle":"Overview","href":"/docs/stable/monitor-and-debug-changefeeds"},{"title":"Changefeed Monitoring Guide","sidebarTitle":"Monitoring Guide","href":"/docs/stable/changefeed-monitoring-guide"},{"title":"Protect Changefeed Data from Garbage Collection","sidebarTitle":"Protect Changefeed Data","href":"/docs/stable/protect-changefeed-data"}]},{"group":"Optimize Changefeeds","expanded":true,"pages":[{"title":"Change Data Capture Queries","href":"/docs/stable/cdc-queries"},{"title":"Changefeeds on Tables with Column Families","href":"/docs/stable/changefeeds-on-tables-with-column-families"},{"title":"Export Data with Changefeeds","href":"/docs/stable/export-data-with-changefeeds"},{"title":"Changefeeds in Multi-Region Deployments","href":"/docs/stable/changefeeds-in-multi-region-deployments"}]},{"group":"Changefeed Tutorials","expanded":true,"pages":[{"group":"Stream a Changefeed to an Amazon MSK Cluster","expanded":true,"pages":[{"title":"Stream a Changefeed to Amazon MSK","sidebarTitle":"Amazon MSK","href":"/docs/stable/stream-a-changefeed-to-amazon-msk"},{"title":"Stream a Changefeed to Amazon MSK Serverless","sidebarTitle":"Amazon MSK Serverless","href":"/docs/stable/stream-a-changefeed-to-amazon-msk-serverless"}]},{"title":"Connect to a Changefeed Kafka Sink with OAuth Using Okta","href":"/docs/stable/connect-to-a-changefeed-kafka-sink-with-oauth-using-okta"},{"title":"Stream a Changefeed to a Confluent Cloud Kafka Cluster","href":"/docs/stable/stream-a-changefeed-to-a-confluent-cloud-kafka-cluster"}]},{"group":"Technical Overview","expanded":true,"pages":[{"title":"How Does a Changefeed Work?","href":"/docs/stable/how-does-a-changefeed-work"}]},{"title":"Advanced Changefeed Configuration","href":"/docs/stable/advanced-changefeed-configuration"}]},{"group":"Cross-Cluster Replication","pages":[{"group":"Logical Data Replication","expanded":true,"pages":[{"title":"Logical Data Replication","sidebarTitle":"Overview","href":"/docs/stable/logical-data-replication-overview"},{"title":"Set Up Logical Data Replication","href":"/docs/stable/set-up-logical-data-replication"},{"title":"Manage Logical Data Replication","href":"/docs/stable/manage-logical-data-replication"},{"title":"Logical Data Replication Monitoring","sidebarTitle":"Monitor Logical Data Replication","href":"/docs/stable/logical-data-replication-monitoring"}]},{"group":"Physical Cluster Replication","expanded":true,"pages":[{"title":"Physical Cluster Replication","sidebarTitle":"Overview","href":"/docs/stable/physical-cluster-replication-overview"},{"title":"Set Up Physical Cluster Replication","href":"/docs/stable/set-up-physical-cluster-replication"},{"title":"Upgrade a Cluster Running PCR","href":"/docs/stable/upgrade-with-pcr"},{"title":"Fail Over from a Primary Cluster to a Standby Cluster","sidebarTitle":"Fail Over from a Primary to a Standby Cluster","href":"/docs/stable/failover-replication"},{"title":"Physical Cluster Replication Monitoring","sidebarTitle":"Monitor a Replication Stream","href":"/docs/stable/physical-cluster-replication-monitoring"},{"title":"Read from Standby","sidebarTitle":"Read From Standby","href":"/docs/stable/read-from-standby"},{"title":"Physical Cluster Replication Technical Overview","sidebarTitle":"Technical Overview","href":"/docs/stable/physical-cluster-replication-technical-overview"},{"group":"Cluster Virtualization","expanded":true,"pages":[{"title":"Cluster Virtualization Overview","sidebarTitle":"Overview","href":"/docs/stable/cluster-virtualization-overview"},{"title":"Work with virtual clusters","sidebarTitle":"Work with Virtual Clusters","href":"/docs/stable/work-with-virtual-clusters"},{"title":"Cluster Setting Scopes with Cluster Virtualization enabled","sidebarTitle":"Setting Scopes","href":"/docs/stable/cluster-virtualization-setting-scopes"},{"title":"Cluster Metric Scopes with Cluster Virtualization enabled","sidebarTitle":"Metric Scopes","href":"/docs/stable/cluster-virtualization-metric-scopes"}]}]}]},{"group":"Multi-Region Capabilities","pages":[{"title":"Multi-Region Capabilities Overview","sidebarTitle":"Overview","href":"/docs/stable/multiregion-overview"},{"title":"Multi-Region Survival Goals","sidebarTitle":"Survival Goals","href":"/docs/stable/multiregion-survival-goals"},{"group":"Data Domiciling and Performance","expanded":true,"pages":[{"title":"Table Localities","href":"/docs/stable/table-localities"},{"title":"Table Partitioning","href":"/docs/stable/partitioning"},{"title":"Data Domiciling with CockroachDB","sidebarTitle":"Data Domiciling with CockroachDB Tutorial","href":"/docs/stable/data-domiciling"}]},{"title":"How to Choose a Multi-Region Configuration","href":"/docs/stable/choosing-a-multi-region-configuration"},{"title":"Multi-Region Zone Config Extensions","href":"/docs/stable/zone-config-extensions"}]},{"group":"Optimize Performance","pages":[{"title":"Optimize Statement Performance Overview","sidebarTitle":"Overview","href":"/docs/stable/make-queries-fast"},{"title":"SQL Performance Best Practices","href":"/docs/stable/performance-best-practices-overview"},{"title":"Indexes","href":"/docs/stable/indexes"},{"title":"Map SQL Activity using an Application Name","href":"/docs/stable/map-sql-activity-to-app"},{"title":"Cost-Based Optimizer","href":"/docs/stable/cost-based-optimizer"},{"title":"Canary Statistics","href":"/docs/stable/canary-statistics"},{"title":"Vectorized Query Execution","sidebarTitle":"Vectorized Execution Engine","href":"/docs/stable/vectorized-execution"},{"title":"Load-Based Splitting","href":"/docs/stable/load-based-splitting"},{"title":"Replication Controls","href":"/docs/stable/configure-replication-zones"},{"title":"Admission Control","href":"/docs/stable/admission-control"},{"title":"Resource Groups","href":"/docs/stable/resource-groups"},{"title":"Monitor and Analyze Transaction Contention","href":"/docs/stable/monitor-and-analyze-transaction-contention"},{"title":"Performance Tuning Recipes","href":"/docs/stable/performance-recipes"},{"group":"Performance Tuning Tutorials","expanded":true,"pages":[{"title":"Statement Tuning with EXPLAIN","sidebarTitle":"Statement Tuning with EXPLAIN","href":"/docs/stable/sql-tuning-with-explain"},{"title":"Apply SQL Statement Performance Rules","href":"/docs/stable/apply-statement-performance-rules"},{"title":"Troubleshoot Lock Contention","href":"/docs/stable/troubleshoot-lock-contention"}]}]},{"group":"Integrate","pages":[{"group":"Ory","expanded":true,"pages":[{"title":"Ory Overview","href":"/docs/stable/ory-overview"},{"title":"Integrate CockroachDB with Ory","sidebarTitle":"Integrate with Ory","href":"/docs/stable/ory-integration-guide"}]},{"title":"Integrate CockroachDB with Satori","sidebarTitle":"Integrate with Satori","href":"/docs/stable/satori-integration"}]}]},{"tab":"Migrate","icon":"arrow-right-arrow-left","pages":[{"title":"Migrate","href":"/docs/molt/migration-overview"}]},{"tab":"SQL","icon":"code","pages":[{"title":"SQL","href":"/docs/stable/sql-statements"}]},{"tab":"Reference","icon":"book","pages":[{"title":"Reference","href":"/docs/stable/architecture/glossary"}]},{"tab":"Cluster API","icon":"rocket","pages":[{"title":"Cluster API","href":"/docs/api/cluster"}]},{"tab":"Troubleshoot","icon":"bug","pages":[{"title":"Troubleshoot","href":"/docs/stable/troubleshooting-overview"}]}]},{"version":"v26.3","pages":[{"title":"v26.3","href":"/docs/v26.3/topology-follower-reads"}]},{"version":"v26.2","pages":[{"title":"v26.2","href":"/docs/v26.2/topology-follower-reads"}]},{"version":"v26.1","pages":[{"title":"v26.1","href":"/docs/v26.1/topology-follower-reads"}]},{"version":"v25.4","tag":"LTS","pages":[{"title":"v25.4","href":"/docs/v25.4/topology-follower-reads"}]},{"version":"v25.3","tag":"Unsupported","pages":[{"title":"v25.3","href":"/docs/v25.3/topology-follower-reads"}]},{"version":"v25.2","tag":"LTS","pages":[{"title":"v25.2","href":"/docs/v25.2/topology-follower-reads"}]},{"version":"v25.1","tag":"Unsupported","pages":[{"title":"v25.1","href":"/docs/v25.1/topology-follower-reads"}]},{"version":"v24.3","tag":"LTS","pages":[{"title":"v24.3","href":"/docs/v24.3/topology-follower-reads"}]},{"version":"v24.1","tag":"LTS","pages":[{"title":"v24.1","href":"/docs/v24.1/topology-follower-reads"}]},{"version":"v23.2","tag":"LTS","pages":[{"title":"v23.2","href":"/docs/v23.2/topology-follower-reads"}]},{"version":"v23.1","tag":"Unsupported","pages":[{"title":"v23.1","href":"/docs/v23.1/topology-follower-reads"}]}]},{"product":"Cloud Deployments","icon":"cloud","description":"Fully managed CockroachDB","pages":[{"title":"Cloud Deployments","href":"/docs/cockroachcloud"}]},{"product":"Releases","icon":"list","description":"Version history, support policy \u0026 advisories","pages":[{"title":"Releases","href":"/docs/releases"}]}]},"basePath":"","title":"Follower Reads Topology - CockroachDB","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-CE4cYsJE.js","lightbox-handle-r17bVUz3.js"]}