You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/08/06 13:01:46 UTC

[GitHub] [couchdb] craftzdog opened a new issue #3063: _bulk_get with latest option is slow

craftzdog opened a new issue #3063:
URL: https://github.com/apache/couchdb/issues/3063


   Hello.
   I'm building an app that replicates user data using PouchDB.
   The replication protocol uses [_bulk_get API with `latest=true`](https://github.com/pouchdb/pouchdb/issues/5857).
   I found that this API responds 3x slower than without that option specified when I call it with 100 doc IDs on my server.
   I understand PouchDB needs this option to replicate data in order to make sure that docs are always latest.
   If I dropped this option, PouchDB seems to randomly crash because it gets an error response from CouchDB when the doc or its revision is not found.
   Would it be possible to improve the `latest` behavior?
   
   ## Summary
   
   Improve `latest` option performance
   
   ## Possible Solution
   
   I found that it checks revision tree when `latest` is specified here: https://github.com/apache/couchdb/blob/3fc054d86f0844bdf851e402b05df5db08b1c230/src/fabric/src/fabric_doc_open_revs.erl#L94
   But I don't know if there is room to improve it.
   
   Thanks in advance!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] craftzdog commented on issue #3063: _bulk_get with latest=true option is slow

Posted by GitBox <gi...@apache.org>.
craftzdog commented on issue #3063:
URL: https://github.com/apache/couchdb/issues/3063#issuecomment-670386156


   The bottleneck was my network on EC2.
   My cluster nodes were deployed across different regions in order to make them disaster tolerant.
   That caused the network bottleneck between nodes where the RTT was around 166ms.
   I moved the nodes to the single region but in different availability zones.
   Now it works very fast!
   
   Sorry for bothering you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] craftzdog closed issue #3063: _bulk_get with latest=true option is slow

Posted by GitBox <gi...@apache.org>.
craftzdog closed issue #3063:
URL: https://github.com/apache/couchdb/issues/3063


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org