Should I use pull or push replication in CouchDB?

Viewed 61

We're setting up replication from one Cloudant instance to another Cloudant instance. I've read in the documentation that it doesn't matter if the replication is set up as "push" from the source to the destination or "pull" from the source to destination.

So if it doesn't matter from a performance perspective, is there a CouchDB/Cloudant "best practice" to set up a push model vs pull model? Is there a preferred way?

1 Answers

There is a “cost” to doing replication orchestration. If it’s an active-active setup it really doesn’t matter. But if it’s an active-passive setup, you should let the passive pull data from the source. That way the orchestration work won’t tax the active side.

If one of the instances is CouchDB, then you will also need to consider which auth mechanisms are available to the replicator: e.g. the CouchDB can't push to or pull from an IAM-only Cloudant instance because it knows nothing about IAM - so in those cases Cloudant has to orchestrate the replication.

You should also consider firewall rules: sometimes people choose to pull from inside a firewall because they aren't able to accept the connections required by a push from the other side

Related