Replicated nodes behind load balancer with changes endpoint - different SEQ on each node

As per the title I am trying to use couchbase with two replicated nodes behind a load balancer (A write one; replicate other model)
This arrangement works fine with REST calls, but using the _changes endpoint I am having the problem that the SEQ from one node does not match any of the other nodes, so if an initial call goes to one and then the load balancer switches nodes I end up performing a “rewind” i.e. a re-sync of all the data from scratch, which I would like to avoid.

I have looked at options such as sticky sessions but these only seem like partial fixes (we will still get lots of re-sync when a node is down, for example, and potentially in a failover situation you could get a cascading failure (first failure causes lots of clients to resync from scratch, increasing the load on the remaining servers)
Another option is to limit which node the _changes call goes to, i.e. to force it to the master(write) node, which is probably what we’ll do if we can’t find any other solution.

Any advice on how best to handle this situation? We’d really like to prevent any resync’s at all if possible

1 Like