CockroachDB was designed to create the source-available database we would want to use: one that is both scalable and consistent. Developers often have questions about how we’ve achieved this, and this guide sets out to detail the inner workings of as a means of explanation.However, you definitely do not need to understand the underlying architecture to use CockroachDB. These pages give serious users and database enthusiasts a high-level framework to explain what’s happening under the hood.
This guide is broken out into pages detailing each layer of CockroachDB. We recommended reading through the layers sequentially, starting with this overview and then proceeding to the .If you’re looking for a high-level understanding of CockroachDB, you can read the Overview section of each layer. For more technical detail — for example, if you’re interested in contributing to the project — you should read the Components sections as well.
This guide details how CockroachDB is built, but does not explain how to build an application using CockroachDB. For more information about how to develop applications that use CockroachDB, check out our .
CockroachDB was designed to meet the following goals:
Make life easier for humans. This means being low-touch and highly automated for and simple to reason about for .
Offer industry-leading consistency, even on massively scaled deployments. This means enabling distributed , as well as removing the pain of eventual consistency issues and stale reads.
Create an always-on database that accepts reads and writes on all nodes without generating conflicts.
Allow flexible deployment in any environment, without tying you to any platform or vendor.
Support familiar tools for working with relational data (i.e., ).
With the confluence of these features, we hope that CockroachDB helps you build global, scalable, resilient deployments and .
CockroachDB starts running on machines with two commands:
with a --join flag for all of the initial nodes in the cluster, so the process knows all of the other machines it can communicate with.
to perform a one-time initialization of the cluster.
Once the CockroachDB cluster is initialized, developers interact with CockroachDB through a SQL API. Thanks to the symmetrical behavior of all nodes in a cluster, you can send to any node; this makes CockroachDB easy to integrate with .After receiving SQL remote procedure calls (RPCs), nodes convert them into key-value (KV) operations that work with our .As these RPCs start filling your cluster with data, CockroachDB starts , breaking the data up into chunks that we call ranges. Each range is replicated to at least to ensure survivability. This ensures that if any nodes go down, you still have copies of the data which can be used for:
Continuing to serve reads and writes.
Consistently the data to other nodes.
If a node receives a read or write request it cannot directly serve, it finds the node that can handle the request, and communicates with that node. This means you do not need to know where in the cluster a specific portion of your data is stored; CockroachDB tracks it for you, and enables symmetric read/write behavior from each node.Any changes made to the data in a range rely on a to ensure that the majority of the range’s replicas agree to commit the change. This is how CockroachDB achieves the industry-leading isolation guarantees that allow it to provide your application with consistent reads and writes, regardless of which node you communicate with.Ultimately, data is written to and read from disk using an efficient , which is able to keep track of the data’s timestamp. This has the benefit of letting us support the SQL standard clause, letting you find historical data for a period of time.While the high-level overview above gives you a notion of what CockroachDB does, looking at how CockroachDB operates at each of these layers will give you much greater understanding of our architecture.
At the highest level, CockroachDB converts clients’ SQL statements into key-value (KV) data, which is distributed among nodes and written to disk. CockroachDB’s architecture is manifested as a number of layers, each of which interacts with the layers directly above and below it as relatively opaque services.The following pages describe the function each layer performs, while mostly ignoring the details of other layers. This description is true to the experience of the layers themselves, which generally treat the other layers as black-box APIs. There are some interactions that occur between layers that require an understanding of each layer’s function to understand the entire process.
The requirement that a transaction must change affected data only in allowed ways. CockroachDB uses “consistency” in both the sense of ACID semantics and the CAP theorem, albeit less formally than either definition.
The degree to which a transaction may be affected by other transactions running at the same time. CockroachDB provides the SERIALIZABLE and READ COMMITTED isolation levels. For more information, see .
The process of reaching agreement on whether a transaction is committed or aborted. CockroachDB uses the Raft consensus protocol. In CockroachDB, when a range receives a write, a quorum of nodes containing replicas of the range acknowledge the write. This means your data is safely stored and a majority of nodes agree on the database’s current state, even if some of the nodes are offline.When a write does not achieve consensus, forward progress halts to maintain consistency within the cluster.
The process of creating and distributing copies of data, as well as ensuring that those copies remain consistent. CockroachDB requires all writes to propagate to a quorum of copies of the data before being considered committed. This ensures the consistency of your data.
A set of operations performed on a database that satisfy the requirements of ACID semantics. This is a crucial feature for a consistent system to ensure developers can trust the data in their database. For more information about how transactions work in CockroachDB, see .
A is unable to complete due to another concurrent or recent transaction attempting to write to the same data. This is also called lock contention.
A transaction is because it could not be placed into a among all of the currently executing transactions. This is also called a serialization conflict. If the automatic retry is not possible or fails, a is emitted to the client, requiring a client application running under SERIALIZABLE isolation to .
A consensus-based notion of high availability that lets each node in the cluster handle reads and writes for a subset of the stored data (on a per-range basis). This is in contrast to active-passive replication, in which the active node receives 100% of request traffic, and active-active replication, in which all nodes accept requests but typically cannot guarantee that reads are both up-to-date and fast.
A SQL user is an identity capable of executing SQL statements and performing other cluster actions against CockroachDB clusters. SQL users must authenticate with an option permitted on the cluster (username/password, single sign-on (SSO), or certificate). Note that a SQL/cluster user is distinct from a CockroachDB Cloud organization user.
A group of interconnected CockroachDB nodes that function as a single distributed SQL database server. Nodes collaboratively organize transactions, and rebalance workload and data storage to optimize performance and fault-tolerance.Each cluster has its own authorization hierarchy, meaning that users and roles must be defined on that specific cluster.A CockroachDB cluster can be run in CockroachDB Cloud, within a customer , or can be self-hosted.
CockroachDB stores all user data (tables, indexes, etc.) and almost all system data in a sorted map of key-value pairs. This keyspace is divided into contiguous chunks called ranges, such that every key is found in one range.From a SQL perspective, a table and its secondary indexes initially map to a single range, where each key-value pair in the range represents a single row in the table (also called the primary index because the table is sorted by the primary key) or a single row in a secondary index. As soon as the size of a range reaches , it is . This process continues for these new ranges as the table and its indexes continue growing.
The replica that holds the “range lease.” This replica receives and coordinates all read and write requests for the range.For most types of tables and queries, the leaseholder is the only replica that can serve consistent reads (reads that return “the latest” data).The leaseholder is always the same replica as the Raft leader, except briefly during . For more information, refer to .
The employed in CockroachDB that ensures that your data is safely stored on multiple nodes and that those nodes agree on the current state even if some of them are temporarily disconnected.
For each range, the replica that is the “leader” for write requests. The leader uses the Raft protocol to ensure that a majority of replicas (the leader and enough followers) agree, based on their Raft logs, before committing the write. The Raft leader is always the same replica as the leaseholder. For more information, refer to .
A time-ordered log of writes to a range that its replicas have agreed on. This log exists on-disk with each replica and is the range’s source of truth for consistent replication.
Start by learning about what CockroachDB does with your SQL statements at the .
{"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":""},"chroma":{"liveDeploymentHistoryId":"6ae3a581e25e6a2096a5ae5f","collectionId":"bf7d1651-0063-4472-a58a-ee9bfee233bb","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae3a581e25e6a2096a5ae5f"},"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":"6ae3a581e25e6a2096a5ae5f","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"CockroachDB","count":6969},{"language":"default","tag":"Docs","count":3239},{"language":"default","tag":"SQL","count":2562},{"language":"default","tag":"Statements","count":1710},{"language":"default","tag":"Self-Hosted Deployments","count":1480},{"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":false}},"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":"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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","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-fixed-table table,.crdb-metrics-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,.crdb-metrics-table table td,.crdb-metrics-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:.5rem;margin-bottom:2rem!important;padding:2rem}.card{border:1px solid #e5e7eb;border-radius:.75rem;background-color:#fff}.dark .card{background-color:#0d1117;border-color:rgba(255,255,255,.1)}.card-link,.card-link:hover{transform:none!important;box-shadow:none!important}.card-link{text-decoration:none!important;overflow:hidden}.card-link:hover{outline:1px solid rgba(105,51,255,.55);outline-offset:-1px}.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}.article-lists h3,.overline{text-transform:uppercase;letter-spacing:.05em}.btn-redirect{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border:2px solid #e5e7eb;border-radius:.5rem;text-decoration:none;transition:border-color .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,.1)}.article-section-title{font-size:1.25rem!important}.article-lists h3{font-size:.875rem!important;font-weight:600!important;color:#6b7280!important}.dark .article-lists h3,.dark .card-link .card-desc{color:#9ca3af!important}.article-lists ul{font-size:.875rem}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)}.bg-dark-wing{background-color:#152849;border-radius:.5rem}.text-ice-temple{color:#1bf8ec!important;display:inline-flex;align-items:center;gap:.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:.9375rem!important;font-weight:400!important;line-height:1.5!important;text-align:left!important;color:#4b5563!important;width:100%;margin-top:.5rem}.report-tag{display:inline-block;padding:.25rem .75rem;border-radius:.25rem;background-color:rgba(84,42,189,.08);color:#542abd}.dark .report-tag{background-color:rgba(84,42,189,.3);color:#b39dff}.resilience-report-img{background-image:url(/images/state-resilience.png);background-size:cover;background-position:center;min-height:150px;border-radius:.5rem}.row{flex-wrap:wrap;margin-left:-.75rem;margin-right:-.75rem}.display-flex,.row{display:flex!important}.col-lg-4{flex:0 0 auto;width:100%;padding-left:.75rem;padding-right:.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:.75rem;padding-right:.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:.75rem;padding-right:.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:.75rem;padding-right:.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:.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:.5rem!important}.mb-0{margin-bottom:0!important}.mb-2{margin-bottom:.5rem!important}.mb-4{margin-bottom:1.5rem!important}.p-2{padding:.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:.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}.dark .text-black,.text-white{color:#fff!important}.text-black{color:#000!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 td,.prose table th{border:1px solid rgb(var(--gray-200))!important}.dark .prose table td,.dark .prose table th{border-color:rgb(var(--gray-700)/.5)!important}.prose table th{padding:.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:.571429em;vertical-align:baseline}[data-component-part=accordion-description]{font-size:.875rem!important}.accordion.mb-3{margin-bottom:.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:700}.sql-grammar svg text.nonterminal,.sql-grammar svg text.regexp{font-family:Verdana,Sans-serif;font-size:12px;fill:#05f}.sql-grammar svg text.regexp{fill:#0f0f0f}.sql-grammar svg circle,.sql-grammar svg polygon,.sql-grammar svg rect{fill:#262626;stroke:#262626}.sql-grammar svg polygon.regexp,.sql-grammar svg rect.nonterminal,.sql-grammar svg rect.terminal{fill:#fff;stroke:#262626}.sql-grammar svg rect.text{fill:none;stroke:none}.sql-grammar svg{background-color:#fff}.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}"}],"page":{"pagePath":"docs/stable/architecture/overview","slug":"/docs/stable/architecture/overview","pageMetadata":{"title":"Architecture Overview","old_description":"Learn about the inner-workings of the CockroachDB architecture.","description":null,"href":"/docs/stable/architecture/overview"},"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={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Note,Table,Tip,_MdxComponentBoundary}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`CockroachDB was designed to create the source-available database we would want to use: one that is both scalable and consistent. Developers often have questions about how we’ve achieved this, and this guide sets out to detail the inner workings of `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsxs(InternalLink,{path:`cockroach-commands`,children:[`the `,_jsx(_components.code,{children:`cockroach`}),` process`]})}),` as a means of explanation.`]}),`\n`,_jsx(_components.p,{children:`However, you definitely do not need to understand the underlying architecture to use CockroachDB. These pages give serious users and database enthusiasts a high-level framework to explain what’s happening under the hood.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If these docs interest you, consider taking the free `,_jsx(_components.a,{href:`https://learn.cockroachlabs.com/introduction-to-distributed-sql-and-cockroachdb`,children:_jsx(_components.strong,{children:`Intro to Distributed SQL and CockroachDB`})}),` course on Cockroach University.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`using-this-guide`,children:`Using this guide`}),`\n`,_jsxs(_components.p,{children:[`This guide is broken out into pages detailing each layer of CockroachDB. We recommended reading through the layers sequentially, starting with this overview and then proceeding to the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/sql-layer`,children:`SQL layer`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`If you’re looking for a high-level understanding of CockroachDB, you can read the `,_jsx(_components.strong,{children:`Overview`}),` section of each layer. For more technical detail — for example, if you’re interested in `,_jsx(_components.a,{href:`https://cockroachlabs.atlassian.net/wiki/x/QQFdB`,children:`contributing to the project`}),` — you should read the `,_jsx(_components.strong,{children:`Components`}),` sections as well.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`This guide details how CockroachDB is built, but does not explain how to build an application using CockroachDB. For more information about how to develop applications that use CockroachDB, check out our `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`developer-basics`,children:`Developer Guide`})}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`goals-of-cockroachdb`,children:`Goals of CockroachDB`}),`\n`,_jsx(_components.p,{children:`CockroachDB was designed to meet the following goals:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Make life easier for humans. This means being low-touch and highly automated for `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`recommended-production-settings`,children:`operators`})}),` and simple to reason about for `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`developer-basics`,children:`developers`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Offer industry-leading `,_jsx(_components.a,{href:`#consistency`,children:`consistency`}),`, even on massively scaled deployments. This means enabling distributed `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/transaction-layer`,children:`transactions`})}),`, as well as removing the pain of eventual consistency issues and stale reads.`]}),`\n`,_jsx(_components.li,{children:`Create an always-on database that accepts reads and writes on all nodes without generating conflicts.`}),`\n`,_jsx(_components.li,{children:`Allow flexible deployment in any environment, without tying you to any platform or vendor.`}),`\n`,_jsxs(_components.li,{children:[`Support familiar tools for working with relational data (i.e., `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/sql-layer`,children:`SQL`})}),`).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`With the confluence of these features, we hope that CockroachDB helps you build global, scalable, resilient deployments and `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`developer-basics`,children:`applications`})}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`CockroachDB starts running on machines with two commands:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-start`,children:_jsx(_components.code,{children:`cockroach start`})})}),` with a `,_jsx(_components.code,{children:`--join`}),` flag for all of the initial nodes in the cluster, so the process knows all of the other machines it can communicate with.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-init`,children:_jsx(_components.code,{children:`cockroach init`})})}),` to perform a one-time initialization of the cluster.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Once the CockroachDB cluster is initialized, developers interact with CockroachDB through a `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`postgresql-compatibility`,children:`PostgreSQL-compatible`})}),` SQL API. Thanks to the symmetrical behavior of all nodes in a cluster, you can send `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/sql-layer`,children:`SQL requests`})}),` to any node; this makes CockroachDB easy to integrate with `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`recommended-production-settings#load-balancing`,children:`load balancers`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`After receiving SQL remote procedure calls (RPCs), nodes convert them into key-value (KV) operations that work with our `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/transaction-layer`,children:`distributed, transactional key-value store`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`As these RPCs start filling your cluster with data, CockroachDB starts `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/distribution-layer`,children:`algorithmically distributing your data among the nodes of the cluster`})}),`, breaking the data up into chunks that we call `,_jsx(_components.a,{href:`#architecture-range`,children:`ranges`}),`. Each range is replicated to at least `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`configure-replication-zones`,children:`3 nodes by default`})}),` to ensure survivability. This ensures that if any nodes go down, you still have copies of the data which can be used for:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Continuing to serve reads and writes.`}),`\n`,_jsxs(_components.li,{children:[`Consistently `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/replication-layer`,children:`replicating`})}),` the data to other nodes.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`If a node receives a read or write request it cannot directly serve, it finds the node that can handle the request, and communicates with that node. This means you do not need to know where in the cluster a specific portion of your data is stored; CockroachDB tracks it for you, and enables symmetric read/write behavior from each node.`}),`\n`,_jsxs(_components.p,{children:[`Any changes made to the data in a `,_jsx(_components.a,{href:`#architecture-range`,children:`range`}),` rely on a `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/replication-layer#raft`,children:`consensus algorithm`})}),` to ensure that the majority of the range’s `,_jsx(_components.a,{href:`#architecture-replica`,children:`replicas`}),` agree to commit the change. This is how CockroachDB achieves the industry-leading isolation guarantees that allow it to provide your application with consistent reads and writes, regardless of which node you communicate with.`]}),`\n`,_jsxs(_components.p,{children:[`Ultimately, data is written to and read from disk using an efficient `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/storage-layer`,children:`storage engine`})}),`, which is able to keep track of the data’s timestamp. This has the benefit of letting us support the SQL standard `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`as-of-system-time`,children:_jsx(_components.code,{children:`AS OF SYSTEM TIME`})})}),` clause, letting you find historical data for a period of time.`]}),`\n`,_jsx(_components.p,{children:`While the high-level overview above gives you a notion of what CockroachDB does, looking at how CockroachDB operates at each of these layers will give you much greater understanding of our architecture.`}),`\n`,_jsx(Heading,{level:`3`,id:`layers`,children:`Layers`}),`\n`,_jsx(_components.p,{children:`At the highest level, CockroachDB converts clients’ SQL statements into key-value (KV) data, which is distributed among nodes and written to disk. CockroachDB’s architecture is manifested as a number of layers, each of which interacts with the layers directly above and below it as relatively opaque services.`}),`\n`,_jsx(_components.p,{children:`The following pages describe the function each layer performs, while mostly ignoring the details of other layers. This description is true to the experience of the layers themselves, which generally treat the other layers as black-box APIs. There are some interactions that occur between layers that require an understanding of each layer’s function to understand the entire process.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Layer`}),_jsx(_components.th,{children:`Order`}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/sql-layer`,children:`SQL`})})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:`Translate client SQL queries to KV operations.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/transaction-layer`,children:`Transactional`})})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{children:`Allow atomic changes to multiple KV entries.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/distribution-layer`,children:`Distribution`})})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsxs(_components.td,{children:[`Present replicated KV `,_jsx(_components.a,{href:`#architecture-range`,children:`ranges`}),` as a single entity.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/replication-layer`,children:`Replication`})})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsxs(_components.td,{children:[`Consistently and synchronously replicate KV `,_jsx(_components.a,{href:`#architecture-range`,children:`ranges`}),` across many `,_jsx(_components.a,{href:`#node`,children:`nodes`}),`. This layer also enables `,_jsx(_components.a,{href:`#consistency`,children:`consistent`}),` reads using a consensus algorithm.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/storage-layer`,children:`Storage`})})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`5`}),_jsx(_components.td,{children:`Read and write KV data on disk.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`database-terms`,children:`Database terms`}),`\n`,_jsx(Heading,{level:`3`,id:`consistency`,children:`Consistency`}),`\n`,_jsxs(_components.p,{children:[`The requirement that a transaction must change affected data only in allowed ways. CockroachDB uses “consistency” in both the sense of `,_jsx(_components.a,{href:`https://en.wikipedia.org/wiki/ACID`,children:`ACID semantics`}),` and the `,_jsx(_components.a,{href:`https://wikipedia.org/wiki/CAP_theorem`,children:`CAP theorem`}),`, albeit less formally than either definition.`]}),`\n`,_jsx(Heading,{level:`3`,id:`isolation`,children:`Isolation`}),`\n`,_jsxs(_components.p,{children:[`The degree to which a transaction may be affected by other transactions running at the same time. CockroachDB provides the `,_jsx(_components.a,{href:`https://wikipedia.org/wiki/Serializability`,children:_jsx(_components.code,{children:`SERIALIZABLE`})}),` and `,_jsx(_components.code,{children:`READ COMMITTED`}),` isolation levels. For more information, see `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`transactions#isolation-levels`,children:`Isolation levels`})}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`consensus`,children:`Consensus`}),`\n`,_jsxs(_components.p,{children:[_jsx(`a`,{id:`architecture-overview-consensus`}),` The process of reaching agreement on whether a transaction is committed or aborted. CockroachDB uses the `,_jsx(_components.a,{href:`#architecture-raft`,children:`Raft consensus protocol`}),`. In CockroachDB, when a range receives a write, a `,_jsx(_components.a,{href:`https://wikipedia.org/wiki/Quorum_%28distributed_computing%29`,children:`quorum`}),` of nodes containing replicas of the range acknowledge the write. This means your data is safely stored and a majority of nodes agree on the database’s current state, even if some of the nodes are offline.`]}),`\n`,_jsx(_components.p,{children:`When a write does not achieve consensus, forward progress halts to maintain consistency within the cluster.`}),`\n`,_jsx(Heading,{level:`3`,id:`replication`,children:`Replication`}),`\n`,_jsxs(_components.p,{children:[`The process of creating and distributing copies of data, as well as ensuring that those copies remain consistent. CockroachDB requires all writes to propagate to a `,_jsx(_components.a,{href:`https://wikipedia.org/wiki/Quorum_%28distributed_computing%29`,children:`quorum`}),` of copies of the data before being considered committed. This ensures the consistency of your data.`]}),`\n`,_jsx(Heading,{level:`3`,id:`transaction`,children:`Transaction`}),`\n`,_jsxs(_components.p,{children:[`A set of operations performed on a database that satisfy the requirements of `,_jsx(_components.a,{href:`https://en.wikipedia.org/wiki/ACID`,children:`ACID semantics`}),`. This is a crucial feature for a consistent system to ensure developers can trust the data in their database. For more information about how transactions work in CockroachDB, see `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/transaction-layer`,children:`Transaction Layer`})}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`transaction-contention`,children:`Transaction contention`}),`\n`,_jsxs(_components.p,{children:[_jsx(`a`,{id:`architecture-overview-contention`}),` A `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`performance-best-practices-overview#transaction-contention`,children:`state of conflict`})}),` that occurs when:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`transactions`,children:`transaction`})}),` is unable to complete due to another concurrent or recent transaction attempting to write to the same data. This is also called `,_jsx(_components.em,{children:`lock contention`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`A transaction is `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`transactions#automatic-retries`,children:`automatically retried`})}),` because it could not be placed into a `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`demo-serializable`,children:`serializable ordering`})}),` among all of the currently executing transactions. This is also called a `,_jsx(_components.em,{children:`serialization conflict`}),`. If the automatic retry is not possible or fails, a `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`transaction-retry-error-reference`,children:_jsx(_components.em,{children:`transaction retry error`})})}),` is emitted to the client, requiring a client application running under `,_jsx(_components.code,{children:`SERIALIZABLE`}),` isolation to `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`transaction-retry-error-reference#client-side-retry-handling`,children:`retry the transaction`})}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Steps should be taken to `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`performance-best-practices-overview#reduce-transaction-contention`,children:`reduce transaction contention`})}),` in the first place.`]}),`\n`,_jsx(Heading,{level:`3`,id:`multi-active-availability`,children:`Multi-active availability`}),`\n`,_jsxs(_components.p,{children:[`A consensus-based notion of high availability that lets each node in the cluster handle reads and writes for a subset of the stored data (on a per-range basis). This is in contrast to `,_jsx(_components.em,{children:`active-passive replication`}),`, in which the active node receives 100% of request traffic, and `,_jsx(_components.em,{children:`active-active`}),` replication, in which all nodes accept requests but typically cannot guarantee that reads are both up-to-date and fast.`]}),`\n`,_jsx(Heading,{level:`3`,id:`user`,children:`User`}),`\n`,_jsx(_components.p,{children:`A SQL user is an identity capable of executing SQL statements and performing other cluster actions against CockroachDB clusters. SQL users must authenticate with an option permitted on the cluster (username/password, single sign-on (SSO), or certificate). Note that a SQL/cluster user is distinct from a CockroachDB Cloud organization user.`}),`\n`,_jsx(Heading,{level:`2`,id:`cockroachdb-architecture-terms`,children:`CockroachDB architecture terms`}),`\n`,_jsx(Heading,{level:`3`,id:`cluster`,children:`Cluster`}),`\n`,_jsx(_components.p,{children:`A group of interconnected CockroachDB nodes that function as a single distributed SQL database server. Nodes collaboratively organize transactions, and rebalance workload and data storage to optimize performance and fault-tolerance.`}),`\n`,_jsx(_components.p,{children:`Each cluster has its own authorization hierarchy, meaning that users and roles must be defined on that specific cluster.`}),`\n`,_jsxs(_components.p,{children:[`A CockroachDB cluster can be run in CockroachDB Cloud, within a customer `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/glossary#organization`,children:`Organization`})}),`, or can be self-hosted.`]}),`\n`,_jsx(Heading,{level:`3`,id:`node`,children:`Node`}),`\n`,_jsx(_components.p,{children:`An individual instance of CockroachDB. One or more nodes form a cluster.`}),`\n`,_jsx(Heading,{level:`3`,id:`range`,children:`Range`}),`\n`,_jsx(`a`,{id:`architecture-range`}),`\n`,_jsxs(_components.p,{children:[`CockroachDB stores all user data (tables, indexes, etc.) and almost all system data in a sorted map of key-value pairs. This keyspace is divided into contiguous chunks called `,_jsx(_components.em,{children:`ranges`}),`, such that every key is found in one range.`]}),`\n`,_jsxs(_components.p,{children:[`From a SQL perspective, a table and its secondary indexes initially map to a single range, where each key-value pair in the range represents a single row in the table (also called the `,_jsx(_components.em,{children:`primary index`}),` because the table is sorted by the primary key) or a single row in a secondary index. As soon as the size of a range reaches `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`configure-replication-zones`,children:`the default range size`})}),`, it is `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/distribution-layer#range-splits`,children:`split into two ranges`})}),`. This process continues for these new ranges as the table and its indexes continue growing.`]}),`\n`,_jsx(Heading,{level:`3`,id:`replica`,children:`Replica`}),`\n`,_jsx(`a`,{id:`architecture-replica`}),`\n`,_jsxs(_components.p,{children:[`A copy of a range stored on a node. By default, there are three `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`configure-replication-zones`,children:`replicas`})}),` of each range on different nodes.`]}),`\n`,_jsx(Heading,{level:`3`,id:`leaseholder`,children:`Leaseholder`}),`\n`,_jsx(`a`,{id:`architecture-leaseholder`}),`\n`,_jsx(_components.p,{children:`The replica that holds the “range lease.” This replica receives and coordinates all read and write requests for the range.`}),`\n`,_jsx(_components.p,{children:`For most types of tables and queries, the leaseholder is the only replica that can serve consistent reads (reads that return “the latest” data).`}),`\n`,_jsxs(_components.p,{children:[`The leaseholder is always the same replica as the `,_jsx(_components.a,{href:`#architecture-raft-leader`,children:`Raft leader`}),`, except briefly during `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/replication-layer#how-leases-are-transferred-from-a-dead-node`,children:`lease transfers`})}),`. For more information, refer to `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/replication-layer#leader-leases`,children:`Leader leases`})}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`raft-protocol`,children:`Raft protocol`}),`\n`,_jsx(`a`,{id:`architecture-raft`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/replication-layer#raft`,children:`consensus protocol`})}),` employed in CockroachDB that ensures that your data is safely stored on multiple nodes and that those nodes agree on the current state even if some of them are temporarily disconnected.`]}),`\n`,_jsx(Heading,{level:`3`,id:`raft-leader`,children:`Raft leader`}),`\n`,_jsx(`a`,{id:`architecture-raft-leader`}),`\n`,_jsxs(_components.p,{children:[`For each range, the replica that is the “leader” for write requests. The leader uses the Raft protocol to ensure that a majority of replicas (the leader and enough followers) agree, based on their Raft logs, before committing the write. The Raft leader is always the same replica as the `,_jsx(_components.a,{href:`#architecture-raft-leader`,children:`leaseholder`}),`. For more information, refer to `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/replication-layer#leader-leases`,children:`Leader leases`})}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`raft-log`,children:`Raft log`}),`\n`,_jsx(_components.p,{children:`A time-ordered log of writes to a range that its replicas have agreed on. This log exists on-disk with each replica and is the range’s source of truth for consistent replication.`}),`\n`,_jsx(Heading,{level:`2`,id:`what’s-next`,children:`What’s next?`}),`\n`,_jsxs(_components.p,{children:[`Start by learning about what CockroachDB does with your SQL statements at the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/sql-layer`,children:`SQL layer`})}),`.`]})]})}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":"Architecture Overview","old_description":"Learn about the inner-workings of the CockroachDB architecture.","description":null,"href":"/docs/stable/architecture/overview"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[148,586,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Using this guide","slug":"using-this-guide","depth":2,"children":[]},{"title":"Goals of CockroachDB","slug":"goals-of-cockroachdb","depth":2,"children":[]},{"title":"Overview","slug":"overview","depth":2,"children":[{"title":"Layers","slug":"layers","depth":3,"children":[]}]},{"title":"Database terms","slug":"database-terms","depth":2,"children":[{"title":"Consistency","slug":"consistency","depth":3,"children":[]},{"title":"Isolation","slug":"isolation","depth":3,"children":[]},{"title":"Consensus","slug":"consensus","depth":3,"children":[]},{"title":"Replication","slug":"replication","depth":3,"children":[]},{"title":"Transaction","slug":"transaction","depth":3,"children":[]},{"title":"Transaction contention","slug":"transaction-contention","depth":3,"children":[]},{"title":"Multi-active availability","slug":"multi-active-availability","depth":3,"children":[]},{"title":"User","slug":"user","depth":3,"children":[]}]},{"title":"CockroachDB architecture terms","slug":"cockroachdb-architecture-terms","depth":2,"children":[{"title":"Cluster","slug":"cluster","depth":3,"children":[]},{"title":"Node","slug":"node","depth":3,"children":[]},{"title":"Range","slug":"range","depth":3,"children":[]},{"title":"Replica","slug":"replica","depth":3,"children":[]},{"title":"Leaseholder","slug":"leaseholder","depth":3,"children":[]},{"title":"Raft protocol","slug":"raft-protocol","depth":3,"children":[]},{"title":"Raft leader","slug":"raft-leader","depth":3,"children":[]},{"title":"Raft log","slug":"raft-log","depth":3,"children":[]}]},{"title":"What’s next?","slug":"what’s-next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cockroachlabs/4695317e415d4eba/kapa.js","/_mintlify/custom/cockroachlabs/40fb45a3cfe42c92/copy-code-prompt.js"],"subdomain":"cockroachlabs","siteName":"CockroachDB","title":"Architecture Overview - CockroachDB","navMaps":{"firstHrefInVersion":{"v26.4":{"href":"/docs/stable/architecture/overview","matchLevel":0},"v26.3":{"href":"/docs/v26.3/architecture/overview","matchLevel":1,"canonicalOverride":true},"v26.2":{"href":"/docs/v26.2/architecture/overview","matchLevel":1,"canonicalOverride":true},"v26.1":{"href":"/docs/v26.1/architecture/overview","matchLevel":1,"canonicalOverride":true},"v25.4":{"href":"/docs/v25.4/architecture/overview","matchLevel":1,"canonicalOverride":true},"v25.3":{"href":"/docs/v25.3/architecture/overview","matchLevel":1,"canonicalOverride":true},"v25.2":{"href":"/docs/v25.2/architecture/overview","matchLevel":1,"canonicalOverride":true},"v25.1":{"href":"/docs/v25.1/architecture/overview","matchLevel":1,"canonicalOverride":true},"v24.3":{"href":"/docs/v24.3/architecture/overview","matchLevel":1,"canonicalOverride":true},"v24.1":{"href":"/docs/v24.1/architecture/overview","matchLevel":1,"canonicalOverride":true},"v23.2":{"href":"/docs/v23.2/architecture/overview","matchLevel":1,"canonicalOverride":true},"v23.1":{"href":"/docs/v23.1/architecture/overview","matchLevel":1,"canonicalOverride":true}},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T20:15:39.812Z","originalFileLocation":"docs/stable/architecture/overview.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=\"Architecture Overview - 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/architecture/overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cockroachlabs.mintlify.app/_mintlify/api/og/v2?division=Architecture\u0026amp;title=Architecture+Overview\u0026amp;theme=7628870a42004e67b5b3df3d\u0026amp;signature=2c1b0078e962e3a5944cbeb383f83b0d4c94afa9deb2325af4438696c0f293ca\">\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=\"Architecture Overview - CockroachDB\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cockroachlabs.mintlify.app/_mintlify/api/og/v2?division=Architecture\u0026amp;title=Architecture+Overview\u0026amp;theme=7628870a42004e67b5b3df3d\u0026amp;signature=2c1b0078e962e3a5944cbeb383f83b0d4c94afa9deb2325af4438696c0f293ca\">\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/architecture/overview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/stable/architecture/overview.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/architecture/overview#webpage\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/architecture/overview\",\"name\":\"Architecture Overview\",\"dateModified\":\"2026-10-29T20:15:39.812Z\",\"isPartOf\":{\"@id\":\"https://docs.cockroachlabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/architecture/overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cockroachlabs.com/docs/stable/architecture/overview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"CockroachDB\",\"item\":\"https://docs.cockroachlabs.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Architecture Overview\",\"item\":\"https://docs.cockroachlabs.com/docs/stable/architecture/overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cockroachlabs.com/docs/stable/architecture/overview#article\",\"headline\":\"Architecture Overview\",\"name\":\"Architecture Overview\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/architecture/overview\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/architecture/overview#webpage\"},\"dateModified\":\"2026-10-29T20:15:39.812Z\",\"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":"Docs","href":"/docs/stable"}]},{"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":"Glossary","description":null,"href":"/docs/stable/architecture/glossary"},{"group":"Architecture","pages":[{"title":"Architecture Overview","href":"/docs/stable/architecture/overview"},{"title":"SQL Layer","description":null,"href":"/docs/stable/architecture/sql-layer"},{"title":"Transaction Layer","href":"/docs/stable/architecture/transaction-layer"},{"title":"Distribution Layer","href":"/docs/stable/architecture/distribution-layer"},{"title":"Replication Layer","href":"/docs/stable/architecture/replication-layer"},{"title":"Storage Layer","href":"/docs/stable/architecture/storage-layer"},{"title":"Backup Architecture","href":"/docs/stable/backup-architecture"}]},{"title":"Cluster Settings","mode":"wide","href":"/docs/stable/cluster-settings"},{"group":"Cockroach Commands","pages":[{"title":"cockroach Commands Overview","href":"/docs/stable/cockroach-commands"},{"title":"cockroach start","href":"/docs/stable/cockroach-start"},{"title":"cockroach init","href":"/docs/stable/cockroach-init"},{"title":"cockroach start-single-node","href":"/docs/stable/cockroach-start-single-node"},{"title":"cockroach cert","href":"/docs/stable/cockroach-cert"},{"title":"cockroach sql","href":"/docs/stable/cockroach-sql"},{"title":"cockroach sqlfmt","href":"/docs/stable/cockroach-sqlfmt"},{"title":"cockroach node","href":"/docs/stable/cockroach-node"},{"title":"cockroach nodelocal upload","href":"/docs/stable/cockroach-nodelocal-upload"},{"title":"cockroach auth-session","href":"/docs/stable/cockroach-auth-session"},{"title":"cockroach demo","href":"/docs/stable/cockroach-demo"},{"title":"cockroach debug ballast","href":"/docs/stable/cockroach-debug-ballast"},{"title":"cockroach debug encryption-active-key","href":"/docs/stable/cockroach-debug-encryption-active-key"},{"title":"cockroach debug encryption-decrypt","href":"/docs/stable/cockroach-debug-encryption-decrypt"},{"title":"cockroach debug job-trace","href":"/docs/stable/cockroach-debug-job-trace"},{"title":"cockroach debug list-files","href":"/docs/stable/cockroach-debug-list-files"},{"title":"cockroach debug merge-logs","href":"/docs/stable/cockroach-debug-merge-logs"},{"title":"cockroach debug pebble db analyze-data","href":"/docs/stable/cockroach-debug-pebble-db-analyze-data"},{"title":"cockroach debug tsdump","href":"/docs/stable/cockroach-debug-tsdump"},{"title":"cockroach debug upload","href":"/docs/stable/cockroach-debug-upload"},{"title":"cockroach debug zip","href":"/docs/stable/cockroach-debug-zip"},{"title":"cockroach statement-diag","href":"/docs/stable/cockroach-statement-diag"},{"title":"cockroach gen","href":"/docs/stable/cockroach-gen"},{"title":"cockroach userfile upload","href":"/docs/stable/cockroach-userfile-upload"},{"title":"cockroach userfile list","href":"/docs/stable/cockroach-userfile-list"},{"title":"cockroach userfile get","href":"/docs/stable/cockroach-userfile-get"},{"title":"cockroach userfile delete","href":"/docs/stable/cockroach-userfile-delete"},{"title":"cockroach version","href":"/docs/stable/cockroach-version"},{"title":"cockroach workload","href":"/docs/stable/cockroach-workload"},{"title":"cockroach-sql","href":"/docs/stable/cockroach-sql-binary"}]},{"title":"Diagnostics Reporting","href":"/docs/stable/diagnostics-reporting"},{"group":"Logs","pages":[{"title":"Logging Levels and Channels","href":"/docs/stable/logging"},{"title":"Log Formats","href":"/docs/stable/log-formats"},{"title":"Notable Event Types","href":"/docs/stable/eventlog"}]},{"group":"Metrics","pages":[{"title":"Metrics","href":"/docs/stable/metrics"},{"title":"Multi-dimensional Metrics","href":"/docs/stable/multi-dimensional-metrics"}]},{"group":"Policies","pages":[{"title":"API Support Policy","href":"/docs/stable/api-support-policy"},{"title":"Telemetry Collected by CockroachDB","href":"/docs/stable/telemetry"}]},{"group":"Third-Party Support","pages":[{"title":"Third-Party Tools Supported by Cockroach Labs","href":"/docs/stable/third-party-database-tools"},{"title":"Third-Party Monitoring Integrations","href":"/docs/stable/third-party-monitoring-tools"},{"title":"Third-Party Tools Supported by the Community","href":"/docs/stable/community-tooling"}]},{"group":"Security","pages":[{"title":"CockroachDB Security Overview","href":"/docs/stable/security-reference/security-overview"},{"group":"Authentication","pages":[{"title":"SQL Authentication","href":"/docs/stable/security-reference/authentication"},{"title":"SASL/SCRAM-SHA-256 Secure Password-based Authentication","href":"/docs/stable/security-reference/scram-authentication"}]},{"title":"Authorization in CockroachDB","href":"/docs/stable/security-reference/authorization"},{"title":"Encryption in CockroachDB","href":"/docs/stable/security-reference/encryption"},{"title":"Column Level Encryption","href":"/docs/stable/column-level-encryption"},{"title":"Row-Level Security (RLS) Overview","href":"/docs/stable/row-level-security"},{"title":"Transport Layer Security (TLS) and Public Key Infrastructure (PKI)","href":"/docs/stable/security-reference/transport-layer-security"}]},{"group":"System Catalogs","pages":[{"title":"System Catalogs","href":"/docs/stable/system-catalogs"},{"title":"crdb_internal","href":"/docs/stable/crdb-internal"},{"title":"information_schema","href":"/docs/stable/information-schema"},{"title":"pg_catalog","href":"/docs/stable/pg-catalog"},{"title":"pg_extension","href":"/docs/stable/pg-extension"}]},{"group":"FAQs","pages":[{"title":"CockroachDB FAQs","href":"/docs/stable/frequently-asked-questions"},{"title":"Operational FAQs","href":"/docs/stable/operational-faqs"},{"title":"Licensing FAQs","href":"/docs/stable/licensing-faqs"}]}]},{"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/architecture/overview"}]},{"version":"v26.2","pages":[{"title":"v26.2","href":"/docs/v26.2/architecture/overview"}]},{"version":"v26.1","pages":[{"title":"v26.1","href":"/docs/v26.1/architecture/overview"}]},{"version":"v25.4","tag":"LTS","pages":[{"title":"v25.4","href":"/docs/v25.4/architecture/overview"}]},{"version":"v25.3","tag":"Unsupported","pages":[{"title":"v25.3","href":"/docs/v25.3/architecture/overview"}]},{"version":"v25.2","tag":"LTS","pages":[{"title":"v25.2","href":"/docs/v25.2/architecture/overview"}]},{"version":"v25.1","tag":"Unsupported","pages":[{"title":"v25.1","href":"/docs/v25.1/architecture/overview"}]},{"version":"v24.3","tag":"LTS","pages":[{"title":"v24.3","href":"/docs/v24.3/architecture/overview"}]},{"version":"v24.1","tag":"LTS","pages":[{"title":"v24.1","href":"/docs/v24.1/architecture/overview"}]},{"version":"v23.2","tag":"LTS","pages":[{"title":"v23.2","href":"/docs/v23.2/architecture/overview"}]},{"version":"v23.1","tag":"Unsupported","pages":[{"title":"v23.1","href":"/docs/v23.1/architecture/overview"}]}]},{"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"}]}]},"title":"Architecture Overview - CockroachDB","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":[],"chunks":[]}