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

# Why CockroachDB?

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

CockroachDB is a [distributed SQL](https://www.cockroachlabs.com/blog/what-is-distributed-sql/) database built on a transactional and strongly-consistent key-value store. It **scales** horizontally; **survives** disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports **strongly-consistent** ACID transactions; and provides a familiar **SQL** API for structuring, manipulating, and querying data.

CockroachDB is inspired by Google's [Spanner](http://research.google.com/archive/spanner.html) and [F1](http://research.google.com/pubs/pub38125.html) technologies.

<Tip>
  For a deeper dive into CockroachDB's capabilities and how it fits into the database landscape, take the free [**Intro to Distributed SQL and CockroachDB**](https://university.cockroachlabs.com/courses/course-v1:crl+intro-to-distributed-sql-and-cockroachdb+self-paced/about) course on Cockroach University.
</Tip>

## Why use CockroachDB?

There are many reasons to use CockroachDB, including:

* [Resiliency](#resiliency)
* [Scalability](#scalability)
* [Strong consistency](#strong-consistency)
* [Geo-partioning and multi-region features](#geo-partitioning-and-multi-region-features)
* [PostgreSQL-compatibility](#postgresql-compatibility)

### Resiliency

One of the key attributes of CockroachDB is its inherent distributed nature. Data is automatically replicated across multiple nodes for high availability and failover protection, ensuring your data is always accessible. Even during instances of hardware failure or maintenance, the system remains resilient and operational.

For more information, refer to <InternalLink path="demo-fault-tolerance-and-recovery">Fault Tolerance & Recovery</InternalLink>.

### Scalability

CockroachDB supports seamless and efficient horizontal scalability. As your data and transaction volumes increase, you can add more nodes to the cluster to manage this growth, all without a decline in system performance.

For more information, refer to <InternalLink path="demo-replication-and-rebalancing">Replication & Rebalancing</InternalLink>.

### Strong consistency

CockroachDB supports [ACID](https://en.wikipedia.org/wiki/ACID) transactions. This means that every copy of data across all nodes accurately reflects the same state, thereby ensuring data integrity throughout your system.

For more information, refer to <InternalLink path="transactions">Transactions</InternalLink>.

### Geo-partitioning and multi-region features

CockroachDB's geo-partitioning functionality lets you tie data to specific geographical locations, which is beneficial for many reasons, including:

* Reduced Latency: By tying data to a specific location closer to where it is accessed from, latency can be significantly reduced, leading to improved application performance.
* Regulatory Compliance: Geo-partitioning aids in meeting data sovereignty requirements, as it allows storing and processing of data within defined geographic boundaries.
* Surviving Outages: Geo-partitioning ensures that your database can survive availability zone or regional outages, providing an additional layer of data safety.

For more information, refer to <InternalLink path="multiregion-overview">Multi-Region Capabilities Overview</InternalLink>.

### PostgreSQL compatibility

CockroachDB supports the [PostgreSQL wire protocol](https://www.postgresql.org/docs/current/protocol.html) and the majority of PostgreSQL syntax. This means that existing applications built on PostgreSQL can often be migrated to CockroachDB without changing application code.

For more information, refer to <InternalLink path="postgresql-compatibility">PostgreSQL Compatibility</InternalLink>
