92 points · by daw___ · 12y ago · 44 comments
If you are curious about what triggered the post, is my claim that WAIT per se as a primitive does not mean CP or any other kind of consistency, but that it is defined by the rest of the system. To prove my point, I orchestrated a toy and god-driven distributed system where WAIT turned into a strong consistent primitive. The point is that you can replace the "God" part with other stuff to get it real-world.
Apyhr modeled it and found that if you don't read the same way you write (via agreement) the system is inconsistent when you consider reads, but I think this was common knowledge. Every CP system in the base case needs to follow the same path for writes and reads. However most of the times you can invent optimizations to speedup reads.
p.s. Redis replication is asynchronous by default. The WAIT primitive in Redis unstable does just what it claims, that is, to return an acknowledgment when the specified number of replicas received some data. The practical effect is that you can make writes safer for a (big) latency cost.
You're not inspiring confidence in using anything but single node Redis.
The keyspace notifications are great but I use NodeJS at the moment to listen to the events. When will it be possible to run Lua to remove the current point of failure? On the topics page, it says "In the future". Are we looking at years or months?
Currently, NodeJS subscribes to expired keys. When the key is expired it will delete the 'physical' data from the server (thumbnails, more indepth info, etc). If NodeJS fails, even for a few seconds, I will forever have the 'physical' data stored on the server (as it doesn't re-run the expired event).
Having lua scripting do what NodeJS currently does would fix the problem.
Apart from that, Redis is perfect. ;)
For example in this case, a testing environment and the other Sentinel changes actually improve reliability. From the point of view of BITPOS, it is a new command that if not used should not modify the behaviour/stability of the rest of the system in any way.
However compare this process with creating a new release. With 2.8.7 I just need to write a changelog, tag the release on Github, and update a few numbers in the web site. With a release the process is very different, we have a number of release candidates before switching to stable and so forth.
Oh well, in the next weeks we'll get native support for bloom filters, I hope you'll like this! And even without introducing a new data structure, they'll use strings like all the current bit operations.
There are so many issues with sentinels they really are still a hacked together afterthought just to try and tick off a few reliability boxes.
I think that persisting the mutable state in the configuration file is a good thing, since actually in the Sentinel case, the initial configuration is the statement of a given state. As the state evolves it is reflected in the configuration.
The version of Sentinel provided with 2.8.7 also provides a full API that allows to change the configuration while the system is running, so you can automate everything without even having to touch the configuration file at all if you don't like it.
EDIT: sorry replied with a mobile device. Basically we store digests there at Github while the tarballs are in a different server running at Linode. The idea is that is unlikely that an attacker can gain access to both the Github repository and the server where the tarballs are stored.
However security conscious users need to download the tar.gz and verify the digest manually or via a script (the format is computer parseable).
What we recommend currently is just to test it in your specific environment, and to understand the way it works. The weak thing currently, to be honest, is the documentation, but I'm working at it.
I talked to my co workers, and we agreed to put some more time into researching and giving sentinel a shot. You are right about the documentation though.. It isn't very clear and that is probably one of the reasons why we didn't go for it right away.