eladkehat/Couch-RQS — Issue #1: Safe in a replicated environment?
Author: dobesv
Created: 2011-10-24 02:23:00+00:00
State: open

Couch-RQS looks cool but I'm thinking it could break down in a replicated environment like cloudant or one someone set up themselves.

This is because if you submit a document change (i.e. the lock) to two different nodes in the cluster simultaneously, couch will just mark one of them as a conflict and let you come back later to clean it up.

The only way to really have reliable locking would be to have some kind of centralized locking service, which isn't a disaster but may impede scalability and certainly isn't built into couchdb at this time.

So, perhaps the action item behind this ticket is to add some warnings to the documentation about replicated environments. In these environments, the work should be divided such that you run just one worker per event type, or implement a separate central coordination system between workers so they don't run the same job twice.