Live data from Hacker News

“Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

cockroachlabs.com

11–20 of 29 posts

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#11

Can anyone elaborate as to how CockroachDB compares to Scylla? It seems to me like they're very similar on a surface level.

Sure!

Cockroach DB is a full SQL compatible, strongly consistent key-value store. This means you can get the scalability and performance of a key-value store alongside the comfortable SQL query language. You, and all the other developers who work with you who already know SQL, can do pretty much all the things you know and love from SQL like joins, secondary indexes, etc with full ACID compliance. This means that when you read data from the database you always know with 100% certainty you're going to get up to date values (no stale reads).

ScyllaDB is similar in that data is stored in tables with a defined schema, but it uses a different query language, CQL[1], which is often similar to SQL. You can't to joins but you can have secondary indexes. You can store most of the same data types that you know and love from a standard SQL store. Interestingly enough, you get to CHOOSE the level of consistency you get, so you can make your ScyllaDB strongly consistent or choose from an array of eventually consistent options[2]. Most people however go with one of the eventually consistent options, which allow Scylla to be insanely performant and scalable. At the cost of strong consistency, you get an extremely high performance at an almost infinite scale. CockroachDB, while performant and scalable, can't match it here. It stands almost on a tier of it's own in terms of scalability and performance.

So really, the choice is yours based on what you're looking for. I'd choose CockroachDB for my purposes since I'm not storing Apple levels of data and consistency is important to my work, but your specifications and needs may be different.

[1] http://docs.scylladb.com/getting-started/ddl/ [2] http://docs.scylladb.com/architecture/architecture-fault-tol...

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#13
post #5

I always longed for the existence of such an Ops-friendly DB, which - building on solid distributed systems concepts - could make easy and correct the hard things (consistency, geographical replication, effective possibility of zero downtime). Now that I have a good candidate, I find myself wondering whether the performances would be good enough to ditch traditional DBs (I know: I should define "workload" before thin…

We had it with RethinkDB already!

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#14

Can anyone elaborate as to how CockroachDB compares to Scylla? It seems to me like they're very similar on a surface level.

If you want to read about the theoretical underpinnings, Cassandra is derived from the original Dynamo paper[0] from Amazon, and Scylla is a drop-in replacement for Cassandra written in C++ instead of Java. Cockroach follows more closely the Google Spanner[1] approach.

For a more practical summary, compare the architecture overviews of Cassandra[2] and Cockroach[3].

0: http://www.allthingsdistributed.com/files/amazon-dynamo-sosp...

1: https://static.googleusercontent.com/media/research.google.c...

2: https://docs.datastax.com/en/cassandra/3.0/cassandra/archite...

3: https://www.cockroachlabs.com/docs/stable/architecture/overv...

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#15
post #13
post #5

I always longed for the existence of such an Ops-friendly DB, which - building on solid distributed systems concepts - could make easy and correct the hard things (consistency, geographical replication, effective possibility of zero downtime). Now that I have a good candidate, I find myself wondering whether the performances would be good enough to ditch traditional DBs (I know: I should define "workload" before thin…

We had it with RethinkDB already!

Does rethinkdb have ACID? No?

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#16
post #15
post #13

Earlier quoted context omitted.

We had it with RethinkDB already!

Does rethinkdb have ACID? No?

Whether that actually matters is arguable: No one has performant distributed (i.e. cross-partition) ACID. (Except maybe Google.)

For the thing that does matter, which is ACID within the same partition/entity group, I would argue that RethinkDB already does have that.

Mike Stonebraker says that there are no fast distributed transactions [1]. I'm inclined to believe him, and that's not just an appeal to authority.

[1] https://www.youtube.com/watch?v=KRcecxdGxvQ&t=54m22s

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#17
post #13
post #5

I always longed for the existence of such an Ops-friendly DB, which - building on solid distributed systems concepts - could make easy and correct the hard things (consistency, geographical replication, effective possibility of zero downtime). Now that I have a good candidate, I find myself wondering whether the performances would be good enough to ditch traditional DBs (I know: I should define "workload" before thin…

We had it with RethinkDB already!

Except it has lacking performance and is now impractical without a backing support company.

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#18

Can anyone elaborate as to how CockroachDB compares to Scylla? It seems to me like they're very similar on a surface level.

Ultimately the same foundations of a globally distributed key/value store. Scylla is the Cassandra is a mashup of BigTable/Dynamo wide-column advanced key/value design allowing for very high scalability and availability, but the data model and querying abilities are not as flexible. Scylla does have variable per-query consistency settings but is primarily eventually consistent. Does support BATCH statements which are atomic updates, but no Lightweight-Transactions yet to read-before-write, but does have counters now. It's not quite feature parity with Cassandra but quickly getting there.

CockroachDB also uses a key/value store but puts a postgres-compatible SQL layer on top, derived from the Google Spanner approach, so you can get (almost) all the querying abilities and data modeling of a relational database. They're slated to have JSON datatypes soon that will make it very compelling as a general purpose, highly reliable datastore for all of your core data in multiple regions.

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#19
post #5

I always longed for the existence of such an Ops-friendly DB, which - building on solid distributed systems concepts - could make easy and correct the hard things (consistency, geographical replication, effective possibility of zero downtime). Now that I have a good candidate, I find myself wondering whether the performances would be good enough to ditch traditional DBs (I know: I should define "workload" before thin…

Another good candidate is TiDB (https://github.com/pingcap/tidb). It has elastic scalability, ACID compliances, high availability, etc.

At least, TiDB, CRDB, RethinkDB are open source :)

Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB

#20
post #8

Cockroachdb looks very exciting. I’m waiting for it’s Postgres compatibility to be far enough along that it works with Elixir/Phoenix. Is that likely to happen any time soon?

If you are willing to give it a shot, there is currently a fork of postgrex from someone in the Elixir community! It handles some of rough edges of the incompatibility. You can find it at https://hexdocs.pm/postgrex_cdb/readme.html and the source code at https://github.com/jumpn/postgrex.

For any other issues you run into when using it, you may want to see the discussion about postgrex compatibility at https://github.com/cockroachdb/cockroach/issues/5582. If you run into different problems please do file the issue :).

I'm also an Elixir junkie, so I would also love to see ORM compatibility here! I definitely want to dedicated time to it if I can. (Disclaimer: I'm currently interning at Cockroach Labs.)

Post reply on HN