Skip to content

Commit cfd422e

Browse files
author
jseldess
authored
Merge pull request #1061 from cockroachdb/faq-updates
Faq updates
2 parents c712cdc + 02fae81 commit cfd422e

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

frequently-asked-questions.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,20 @@ CockroachDB is inspired by Google's [Spanner](http://research.google.com/archive
1515

1616
## When is CockroachDB a good choice?
1717

18-
CockroachDB is especially well suited for applications that require:
18+
CockroachDB is well suited for applications that require reliable, available, and correct data regardless of scale. It is built to automatically replicate, rebalance, and recover with minimal configuration and operational overhead. Specific use cases include:
1919

20-
- Horizontal scalability
21-
- Business continuity (survivability)
22-
- High levels of consistency
23-
- Support for distributed ACID transactions
20+
- Distributed or replicated OLTP
21+
- Multi-datacenter deployments
22+
- Cloud-native infrastructure initiatives
2423

2524
## When is CockroachDB not a good choice?
2625

2726
CockroachDB is not a good choice when very low latency reads and writes are critical; use an in-memory database instead.
2827

2928
Also, CockroachDB is not yet suitable for:
3029

31-
- Use cases requiring SQL joins ([the feature still needs optimization](https://www.cockroachlabs.com/blog/cockroachdbs-first-join/))
32-
- Use cases requiring JSON/Protobuf data ([slated for an upcoming release](https://github.com/cockroachdb/cockroach/issues/2969))
33-
- Real-time analytics (on our long-term roadmap)
30+
- Complex SQL JOINS ([the feature still needs optimization](https://www.cockroachlabs.com/blog/cockroachdbs-first-join/))
31+
- Heavy analytics / OLAP
3432

3533
## How easy is it to install CockroachDB?
3634

@@ -70,6 +68,21 @@ CockroachDB guarantees the SQL isolation level "serializable", the highest defin
7068
It does so by combining the Raft consensus algorithm for writes and a custom time-based synchronization algorithms for reads.
7169
See our description of [strong consistency](strong-consistency.html) for more details.
7270

71+
## How is CockroachDB both highly availability and strongly consistent?
72+
73+
The [CAP theorem](https://en.wikipedia.org/wiki/CAP_theorem) states that it is impossible for a distributed system to simultaneously provide more than two out of the following three guarantees:
74+
75+
- Consistency
76+
- Availability
77+
- Partition Tolerance
78+
79+
CockroachDB is a CP (consistent and partition tolerant) system. This means
80+
that, in the presence of partitions, the system will become unavailable rather than do anything which might cause inconsistent results. For example, writes require acknowledgements from a majority of replicas, and reads require a lease, which can only be transferred to a different node when writes are possible.
81+
82+
Separately, CockroachDB is also Highly Available, although "available" here means something different than the way it is used in the CAP theorem. In the CAP theorem, availability is a binary property, but for High Availability, we talk about availability as a spectrum (using terms like "five nines" for a system that is available 99.999% of the time).
83+
84+
Being both CP and HA means that whenever a majority of replicas can talk to each other, they should be able to make progress. For example, if you deploy CockroachDB to three datacenters and the network link to one of them fails, the other two datacenters should be able to operate normally with only a few seconds' disruption. We do this by attempting to detect partitions and failures quickly and efficiently, transferring leadership to nodes that are able to communicate with the majority, and routing internal traffic away from nodes that are partitioned away.
85+
7386
## Why is CockroachDB SQL?
7487

7588
At the lowest level, CockroachDB is a distributed, strongly-consistent, transactional key-value store, but the external API is Standard SQL with extensions. This provides developers familiar relational concepts such as schemas, tables, columns, and indexes and the ability to structure, manipulate, and query data using well-established and time-proven tools and processes. Also, since CockroachDB supports the PostgreSQL wire protocol, it’s simple to get your application talking to Cockroach; just find your [PostgreSQL language-specific driver](install-client-drivers.html) and start building.

0 commit comments

Comments
 (0)