It's a bit of a middle ground. Yes, the replication is synchronous, which impacts availability. However, the master can remove a failed replica from the chain fairly quickly. In principle, with proper tuning, a node failure would merely cause a brief hiccup. This would feel more like a period of increased latency than a full-blown outage. So there really needn't be much sacrifice of availability.
However, there's also a sacrifice of partition tolerance. If the master is unable to communicate with any replica, the system can't serve requests. Also, the master is implemented as a collection of Paxos nodes; if these nodes are partitioned from one another, the entire system would grind to a halt.
Since this is intended for intra-datacenter use, one could argue that a full network partition might be unlikely. (Depending on what sort of data center you hang out in.) But in CAP terms, it's possible, of course.
(I base all this on the value-dependent chaining paper cited below.)
This sounds like a CP system to me. There's nothing wrong with that btw, I don't know why people are so reluctant to admit this.
AP systems have some useful properties, but they're also (typically) more difficult to reason about.
The "hiccups" you describe are periods of unavailability. The increased latency is caused by an element of the system waiting for the data to become available again, a totally valid strategy for coping with transient failures/partitions.
Your argument about intra-datacenter partitions being unlikely are true, but they do happen. You also make a good point about such partitions also affecting client applications. Both of these are indicative of CP systems and, like I said: there's nothing wrong with that.
Personally, I think both AP and CP distributed systems are equally interesting. What I consider a red flag is attempting to rationalize how a system "beats CAP".
That's what I was getting at. It's appears to be a CP system. I wish all new distributed databases would have a nice little badge that says, "CP", "AP" or "CA".
Whenever they claim to be distributed but not subject to CAP, I automatically become skeptical.
There's nothing wrong with a CP database; HBase is a CP database and it's quite popular.
To be precise, I would argue this is actually a CA system.
"C" because there are consistency guarantees, which are upheld even in the face of failures / partition.
"A" because the system will continue making progress even after a node failure. What I called a "hiccup" can be made arbitrarily short, in principle at least. The system can work around failed nodes, it does not need to wait for them to be repaired.
Not "P", because if the network falls apart sufficiently, the system will generally not be able to progress.
You cannot guarantee consistency and availability simultaneously in the face of network partitions. Once the line of communications is cut or overloaded (slow enough = a partition), you have to pick one or the other. It's basic physics.
If two entities can't communicate, they can't synchronize state, so one (or both) of them have to quit acting like they have a consistent view of the data.
It's not exactly clear from the paper what CA should mean.
I've seen people claim it means "you guarantee both consistency and availability, as long as there are no network partitions (you don't have to handle those because you haven't chosen P)". That's a supportable claim. So you can do that, but it's kind of a useless choice, because as long as there are no network partitions, both CP and AP systems can also guarantee full consistency and availability.
I lay the CAP family out thus:
* CP: on network partition, lose availability
* AP: on network partition, lose consistency
* CA: on network partition, lose both
It seems to be a common thread among distributed systems engineers who claim to have beaten CAP: "network partitions don't matter for whatever reason, so therefore I can always guarantee both availability and consistency and so CAP must be wrong yaaay!!"
> If two entities can't communicate, they can't synchronize state, so one (or both) of them have to quit acting like they have a consistent view of the data.
With the exception of quantum entanglement, of course.
That blog is quite wrong about partition tolerance. First, the definition is just bizarre:
"Handling a crashed machine counts as partition-tolerance. (Update: I was wrong about this part."
He then goes on to give Stonebraker crap about claiming that "failures" never happen, simply because he doesn't understand the difference between failures and partitions.
Look, the point of "CAP" is this: if you assume nothing about the network, then you can not guarantee CA in the presence of ARBITRARY network partitions. It doesn't say that you can't provide CA under some or even many network partition scenarios. So, the question you should be asking is "what kinds of network partitions happen in practice?". Stonebraker's point was that network partitions are such rare and wholly catastrophic events that worrying about them pulls focus away from much more practical concerns. Hyperdex' point on partition tolerance (admittedly not clearly spelled out) is much more subtle. They offer tolerance of a specific class of partitions. To simply say they are "AP" or "CP" ignores the very important fact that they do in fact tolerate partitions and maintain the CA. This whole "CAP" pick any two is a gross over-simplification that obscures very real distinctions like this.
What you said was right on. I just wanted to add a few things.
The coordinator is only involved for recovering from failures, so the cluster can still serve requests until server (non-coordinator) nodes start failing too.
I would also add that if there is a intra-datacenter partition so severe as to violate HyperDex's failure assumptions, it will likely impact applications built on top of HyperDex as well. It would be necessary to survive such failures with an inter-datacenter system (which could be built on top of HyperDex).
Without more context graphs like that is pretty useless.. For all we know they just invented those numbers. I'm not saying they did, but you get my point..
Those numbers seem way to low for running on the same machine, and if not shouldn't the network be the bottleneck and show similar results for both?
I'm sure there's a reasonable explanation, just as I'm sure they picket benchmarks that makes themselves look good.
Comments
It's a bit of a middle ground. Yes, the replication is synchronous, which impacts availability. However, the master can remove a failed replica from the chain fairly quickly. In principle, with proper tuning, a node failure would merely cause a brief hiccup. This would feel more like a period of increased latency than a full-blown outage. So there really needn't be much sacrifice of availability.
However, there's also a sacrifice of partition tolerance. If the master is unable to communicate with any replica, the system can't serve requests. Also, the master is implemented as a collection of Paxos nodes; if these nodes are partitioned from one another, the entire system would grind to a halt.
Since this is intended for intra-datacenter use, one could argue that a full network partition might be unlikely. (Depending on what sort of data center you hang out in.) But in CAP terms, it's possible, of course.
(I base all this on the value-dependent chaining paper cited below.)
This sounds like a CP system to me. There's nothing wrong with that btw, I don't know why people are so reluctant to admit this.
AP systems have some useful properties, but they're also (typically) more difficult to reason about.
The "hiccups" you describe are periods of unavailability. The increased latency is caused by an element of the system waiting for the data to become available again, a totally valid strategy for coping with transient failures/partitions.
Your argument about intra-datacenter partitions being unlikely are true, but they do happen. You also make a good point about such partitions also affecting client applications. Both of these are indicative of CP systems and, like I said: there's nothing wrong with that.
Personally, I think both AP and CP distributed systems are equally interesting. What I consider a red flag is attempting to rationalize how a system "beats CAP".
That's what I was getting at. It's appears to be a CP system. I wish all new distributed databases would have a nice little badge that says, "CP", "AP" or "CA".
Whenever they claim to be distributed but not subject to CAP, I automatically become skeptical.
There's nothing wrong with a CP database; HBase is a CP database and it's quite popular.
To be precise, I would argue this is actually a CA system.
"C" because there are consistency guarantees, which are upheld even in the face of failures / partition.
"A" because the system will continue making progress even after a node failure. What I called a "hiccup" can be made arbitrarily short, in principle at least. The system can work around failed nodes, it does not need to wait for them to be repaired.
Not "P", because if the network falls apart sufficiently, the system will generally not be able to progress.
> Not "P", because if the network falls apart sufficiently, the system will generally not be able to progress.
Not be able to progress means it is not available.
There is no CA.
You cannot guarantee consistency and availability simultaneously in the face of network partitions. Once the line of communications is cut or overloaded (slow enough = a partition), you have to pick one or the other. It's basic physics.
If two entities can't communicate, they can't synchronize state, so one (or both) of them have to quit acting like they have a consistent view of the data.
It's not exactly clear from the paper what CA should mean.
I've seen people claim it means "you guarantee both consistency and availability, as long as there are no network partitions (you don't have to handle those because you haven't chosen P)". That's a supportable claim. So you can do that, but it's kind of a useless choice, because as long as there are no network partitions, both CP and AP systems can also guarantee full consistency and availability.
I lay the CAP family out thus:
* CP: on network partition, lose availability
* AP: on network partition, lose consistency
* CA: on network partition, lose both
It seems to be a common thread among distributed systems engineers who claim to have beaten CAP: "network partitions don't matter for whatever reason, so therefore I can always guarantee both availability and consistency and so CAP must be wrong yaaay!!"
Sorry, no, nice try.
> If two entities can't communicate, they can't synchronize state, so one (or both) of them have to quit acting like they have a consistent view of the data.
With the exception of quantum entanglement, of course.
You don't get to sacrifice the P. http://codahale.com/you-cant-sacrifice-partition-tolerance/
That blog is quite wrong about partition tolerance. First, the definition is just bizarre:
"Handling a crashed machine counts as partition-tolerance. (Update: I was wrong about this part."
He then goes on to give Stonebraker crap about claiming that "failures" never happen, simply because he doesn't understand the difference between failures and partitions.
Look, the point of "CAP" is this: if you assume nothing about the network, then you can not guarantee CA in the presence of ARBITRARY network partitions. It doesn't say that you can't provide CA under some or even many network partition scenarios. So, the question you should be asking is "what kinds of network partitions happen in practice?". Stonebraker's point was that network partitions are such rare and wholly catastrophic events that worrying about them pulls focus away from much more practical concerns. Hyperdex' point on partition tolerance (admittedly not clearly spelled out) is much more subtle. They offer tolerance of a specific class of partitions. To simply say they are "AP" or "CP" ignores the very important fact that they do in fact tolerate partitions and maintain the CA. This whole "CAP" pick any two is a gross over-simplification that obscures very real distinctions like this.
What you said was right on. I just wanted to add a few things.
The coordinator is only involved for recovering from failures, so the cluster can still serve requests until server (non-coordinator) nodes start failing too.
I would also add that if there is a intra-datacenter partition so severe as to violate HyperDex's failure assumptions, it will likely impact applications built on top of HyperDex as well. It would be necessary to survive such failures with an inter-datacenter system (which could be built on top of HyperDex).
Well first Thank you for providing another data storage possibility, and a great one at that.
I'd just like to ask - the benchmarks where HyperDex beats even Redis - these are strictly clustered benchmarks - is that true?
Or is the way HyperDex stores data so efficient, that it beats Redis even on a single core / single thread?
Thanks!
Without more context graphs like that is pretty useless.. For all we know they just invented those numbers. I'm not saying they did, but you get my point..
Those numbers seem way to low for running on the same machine, and if not shouldn't the network be the bottleneck and show similar results for both?
I'm sure there's a reasonable explanation, just as I'm sure they picket benchmarks that makes themselves look good.
"if these nodes are partitioned from one another, the entire system would grind to a halt."
Keeping consistency at the expense of availability in the event of a partition is precisely what makes this a CP system.