CouchDB Replication Is Slow In One Direction #4919
Replies: 1 comment
-
@MatthewFrisky does the same happen if you try to run it locally in a dev cluster. Updates usually are sent almost momentarily after they updated on the source. If it takes that long that could suggest the changes feed might be getting buffered in one of the proxies or load balancers. Do you have a chance to verify that or set up unbuffered proxying for _changes feed? The I haven't tested these in a while but we have a few examples on how to setup reverse proxying for Apache CouchDB: https://docs.couchdb.org/en/stable/best-practices/reverse-proxies.html |
Beta Was this translation helpful? Give feedback.
-
Hello, I have replication jobs between two CouchDB instances with an AWS API Gateway and AWS Application Load Balancer in between. One CouchDB is a local instance and one is a cloud EC2 instance. I am observing replication speeds that are very fast going from the local instance to the cloud instance, however in the other direction (from the cloud to the local instance) the replications are slow.
I have found that changing the
[chttpd] changes_timeout
on the cloud can improve the replication speed from the cloud to the local instance, however the replication time appears to always equal the timeout plus some additional value. I also observe similar behavior if I change the[replicator] connection_timeout
on the local instance.Example: If I set the timeout to be 10000 ms the replication would take ~10300 ms. Or if the timeout was 1000 the replication would take ~1300 ms.
I am also using JWT Authentication to connect to the cloud CouchDB.
I am creating the replication jobs by posting to the _replicate endpoint on the local instance and here is the replication job for replicating from the cloud instance to the local instance:
I am trying to find if there is any reason why the replication appears to always wait for the timeout or if there is some other reason the replication would be slow. I can also provide any more details/information if needed.
Beta Was this translation helpful? Give feedback.
All reactions