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://githu…
“Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
21–29 of 29 posts
Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#22Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#23I 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 :)
So is CockroachDB too?
Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#24Earlier quoted context omitted.
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 :)
> At least, TiDB, CRDB, RethinkDB are open source :) So is CockroachDB too?
The parent poster was referring to CockroachDB as CRDB.
Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#25Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#26Isn't "Follow-the-workload" something that is naturally achieved when Mencius is used iso Raft?
Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#27Isn't "Follow-the-workload" something that is naturally achieved when Mencius is used iso Raft?
WAN-optimized consensus protocols like Mencius and Egalitarian Paxos indeed are better for writes because any node can commit a write in one round trip, but they don't allow for reads with zero round trips. Every read must go through the consensus machinery in order to ensure consistency, whereas in CockroachDB the leaseholder can serve reads without needing to consult other nodes.
Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#28Earlier quoted context omitted.
WAN-optimized consensus protocols like Mencius and Egalitarian Paxos indeed are better for writes because any node can commit a write in one round trip, but they don't allow for reads with zero round trips. Every read must go through the consensus machinery in order to ensure consistency, whereas in CockroachDB the leaseholder can serve reads without needing to consult other nodes.
why do reads have to go through the consensus machinery ? If they don't go through the machinery, read results will still be consistent, they just might not include the very last updates, but you cannot avoid that. Raft has the same problem (they all have, and it's unavoidable): suppose you read from the Leader (Master, whatever you call it); the leader sends you a perfect fresh consistent value; however, your networ…
Suppose you write value a to leader A and then value b to leader A. Node B got both updates, node C got only the a value because of network timeouts.
Now you do a read from B of both values, you get the current a and b. Then you do a read from C, you receive the current a and the old b. Inconsistent.
Basically a violation of serializability and linearizability across the cluster in respect to the client.
Re: “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
#29Earlier quoted context omitted.
why do reads have to go through the consensus machinery ? If they don't go through the machinery, read results will still be consistent, they just might not include the very last updates, but you cannot avoid that. Raft has the same problem (they all have, and it's unavoidable): suppose you read from the Leader (Master, whatever you call it); the leader sends you a perfect fresh consistent value; however, your networ…
Without the consensus read you can get inconsistent values. Suppose you write value a to leader A and then value b to leader A. Node B got both updates, node C got only the a value because of network timeouts. Now you do a read from B of both values, you get the current a and b. Then you do a read from C, you receive the current a and the old b. Inconsistent. Basically a violation of serializability and linearizabili…