by rdtsc · 11y ago · 0 comments
The general take-away from most of them is -- do not believe the vendors of distributed systems. Even systems that were meant to solve consensus (etcd, consul) failed:
https://aphyr.com/posts/316-call-me-maybe-etcd-and-consul
Elasticsearch didn't do well, MongoDB, Kafka, etc.
The only ones that did ok that I remember were: Zookeeper, Riak (with siblings), and maybe Cassandra.
Some are very thankful for the analysis, others don't seem to appreciate how important correctness is in this type of distributed systems. I find it's a good indicator of the maturity of the teams working on them, and how much I'm willing to trust each system.
I hate to nitpick but I'm generally curious. How do you know it's a good indicator? It can definitely be _an_ indicator but how do you know it was good? Did you have a follow up experience that validated what the indicator indicated?
One way is to note whether or not the response to the report dismisses it or hand-waves it away. Another response is to neglect the report for 18 months with no reply.
The tests that aphyr conducts are brutal, which you can see by casual inspection of his Call Me Maybe site or his talks. If the response of a software team tries to divert his attention or your attention from the issue, it does not leave a good impression.
The criticism is that last-write-wins is the default, and that's a fair criticism--that's not an honest default for a robust eventually consistent system like Riak. My guess is they default to LWW to ease onboarding of new users. Everyone is worried about rivaling MongoDB's out-of-the-box experience so you don't scare people away...
TBH, though, if you're using a distributed, eventually consistent storage system without understanding the consequences, you're probably using the wrong tool.
As some comment below, the reason for this observed behavior is due to the fact that the server, together with the client, form a kind of distributed system. It is not classified as a failure to perform a write and fail to ACK that to the client. The reverse (not performing an ACKed write) is a failure. However, this suggests that every non ACKed write operation should be retried with care, because it may have gone through. It's better if you can use idempotency semantics, like 9.5's upcoming http://www.postgresql.org/docs/9.5/static/sql-insert.html#SQ... (ON CONFLICT, aka UPSERT).
It's worthwhile to note that this is a fairly general problem in many, many kinds of systems.
If that's actually a problem, you can use 2PC. If you didn't get back an ack for the PREPARE TRANSACTION it failed (and you better abort it explicitly until you get an error that it doesnt exist!). Once the PREPARE succeeded you send COMMIT PREPARED until you suceed or get an error that the repared transaction doesn't exist anymore (in which case you suceeded but didn't get the memo about it).
If the network recovers while the last WAL log your replica read still exists on the server, your replica probably get to catch up, as long as your replica can read the logs as fast as they're being rotated out.
Postgres doesn't really try much else in the realm of distributed systems, so there's not much else you can test.
Skytools would be interesting, though, I've never felt particularly comfortable with replication schemes that trust an external process to ship rows and other changes, compared to the binary replication that will absolutely fail if you don't have every bit.
Also, an old blog entry from yammer engg. blog: http://old.eng.yammer.com/call-me-maybe-hbase/