Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> it does prevent the same message from being consumed multiple times within the visibility timeout.

... When there is no failure of the underlying system. The expectation of any queue is that messages are only delivered once. But that's not what's interesting: what matters is what happens when there's a system failure: either the message gets delivered more than once, the message gets delivered zero times, or a little of column A and a little of column B (which is the worst of both worlds and is a bug). If you have one queue node, it can fail and lose your data. If you have multiple queue nodes, you can have a network partition. In all cases, it's possible to not know whether the message was processed or not at some point



The Two Generals Problem is a great thought experiment that describes how distributed consensus is impossible when communication between nodes has the possibility of failing.

https://en.wikipedia.org/wiki/Two_Generals%27_Problem


Distributed consensus within a quorum is possible. With only two nodes there is no quorum. With three nodes and at most one offline, consensus is possible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: