Live data from Hacker News

NewSQL databases fail to guarantee consistency and I blame Spanner

dbmsmusings.blogspot.com

121–130 of 319 posts

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#121
The author talks about high throughput achieved via batching. But he has not mentioned latency implications of batching, or perhaps I missed that in the article.

Wouldn't batching lead to an increase in transaction latency, even if we achieve higher throughput?

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#122
post #110

The CAP theorem has been truly disastrous for databases. The CAP theorem simply says that if you have a database on 2 servers and the connection between those serves goes down, then queries against one server don't see new updates from the other server, so you either have to give up consistency (serve stale data) or give up availability (one of the servers refuses to process further requests). That's all that CAP is,…

This is exactly right, and perhaps the most cogent explanation of the CAP theorem on the internet.

For a longer explanation of the same idea which includes a concrete example of how you can get "high availability" in a CP system, see: https://apple.github.io/foundationdb/cap-theorem.html

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#123

Earlier quoted context omitted.

"Systems that guarantee consistency only experience a necessary reduction in availability in the event of a network partition." Many of the distributed clusters I've maintained had crap infrastructure and no change control, and parts of the clusters were constantly going down from lack of storage, CPU and RAM, or bad changes. The only reason the applications kept working were either (1) the not-broken vnodes continue…

It seems you have other problems (crap infrastructure and no change control) to deal with before the issues in this article become your biggest concern, but are not the cases you list themselves partition problems?

They cause partition, but their origin isn't the network. Nobody who runs a large system has perfectly behaving infrastructure. Infrastructure always works better in a lab than in the real world. Even if you imagine your infrastructure is rock-solid, people often make assumptions, like their quota is infinite, or their application will scale past the theoretical limits of individual network segments, i/o bounding, etc.

The point is, resources cause problems, and the network is just one of many resources needed by the system. Other resources actually have more constraints on them than the network does. If a resource is constrained, it will impact availability in a highly-consistent model.

The author states that simply adding network redundancy would reduce partitions, and infrastructure problems are proof that this is very short-sighted. "You have bigger problems" - no kidding! Hence the weak-consistency model!

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#124
Seems to have a powerful straw man there about eventual consistency.

The point of AP systems is not 100% availability, but rather higher availability.

By the same reasoning, one should never do CP, because it is also not possible to have 100% consistency. Disk/memory/network corruption, even with ECC can overwhelm the ability to maintain consistency.

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#126
post #104

Earlier quoted context omitted.

Disagreement about what though? Does Spanner's solution have an objective problem? Do you or others in your community have specific reasons to believe that it cannot deliver on its promises?

Spanner's approach requires help from hardware and several full time employees maintaining and ensuring the uncertainty guarantees. This increases the cost of the maintaining the system, which for Cloud Spanner is partially passed on to the end users. If you can build a system that doesn't require time synchronization, yet doesn't have any significant drawbacks relative to what Spanner provides, you'd be better off u…

> If you can build a system that doesn't require time synchronization, yet doesn't have any significant drawbacks relative to what Spanner provides, you'd be better off using this alternative system.

But you describe exactly the drawbacks of giving up time synchronization:

> The main downside of the first category is scalability. A server can process a fixed number of messages per second. If every transaction in the system participates in the same consensus protocol, the same set of servers vote on every transaction. Since voting requires communication, the number of votes per second is limited by the number of messages each server can handle. This limits the total amount of transactions per second that the system can handle.

How is "worse scalability" not a significant drawback?

This just sounds like an engineering tradeoff. I don't think engineering tradeoffs are the same as controversy. I get that your group's DB takes a different approach. But "blaming" Spanner for making a different trade-off doesn't come off well (I approached the article with an open mind).

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#127
post #78

> Systems that guarantee consistency only experience a necessary reduction in availability in the event of a network partition. As networks become more redundant, partitions become an increasingly rare event. And even if there is a partition, it is still possible for the majority partition to be available In my experience, yes network partitions are incredibly rare. However 99% of my distributed ststem partitions hav…

I may be a bit of an old fart, but this is the exact reasoning behind my decision to never go with "distributed X" if there's a "single-machine X" where you can just vertically scale. If you can afford 3-5 machines/VMs for a cluster you can almost certainly afford a single machine/VM with 2-4x the resources/CPU and chances are that it'll perform just as well (or better) because it doesn't have network latency to cont…

I wouldn't call you an old fart... It's just that you understand that massively distributed databases are usually premature optimization.

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#128
I don’t know for sure, but to me the AP vs CP interpretation seems only to be a true limitation for distributed systems of exactly two nodes.

I also like the blogs point that availability is not ever 100%, but I think the added cost of availability levels when going from an eventual consistency system to a linearizable one is underestimated because performance is going to be a significant availability factor, not only failuremodes as discussed.

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#129

Earlier quoted context omitted.

24x7 coverage with a short time-to-repair costs at a minimum several million dollars per year. Interesting - what are the constituents of that cost? What sort of challenges do you face? Do you use PTP grandmaster clocks, or something else? How many sites, and how many clocks per site? Are the support issues mostly hardware failures, configuration problems, or something else? Is 24/7 support needed because the equipme…

I think it was meant that Google has such high costs. I read somewhere that Google operates two atomic clocks in each of its data centers, but I can't find a source for it right now, just this: https://www.wired.com/2012/11/google-spanner-time/

Atomic clocks aren't all that expensive. You can get a decent rubidium one for US $5K.

Re: NewSQL databases fail to guarantee consistency and I blame Spanner

#130
post #87

Earlier quoted context omitted.

People are going to notice a 300m deviation due to landmarks and their eyes.

Rarely, if you are navigating at sea or in the air or in the woods... and even on the road, it is not uncommon for my GPS device to be clearly off without justifying the conclusion that there is a fault in a satellite.

Here are some users that have a high chance of noticing visually and in aggregate would probably produce a lot of noise:

* Air and sea port operators and navigators

* Military personal running supply lines

* Military personal on foot in operations and training

* Space-X

* NASA

* River boats

* Fresh water fishermen

* Etc

Out of all the possible users who would notice a 300m deviation just based on visual reconciliation, I personally would not say it would be so rare that the USAF would not find out very quickly. Of course, this is ignoring the equipment that would likely detect the issue way before somebody in the Army started phoning the USAF.

Post reply on HN