BrodaUa opened a new issue #267:
URL: https://github.com/apache/couchdb-nano/issues/267


   <!--- Provide a general summary of the issue in the Title above -->
   Hello. I have a question regarding Nano performance:
   Is it possible to use Reading Changes Feed (aka nano.changesReader) to track 
the changes in parallel for a large number (1k...10k) of databases in a single 
CouchDB instance? Currently I see the big performance slowdown, as it takes 
minutes (10-20 min) to pick-up the latest change in any db. Thanks.
   ## Expected Behavior
   <!--- If you're describing a bug, tell us what should happen -->
   <!--- If you're suggesting a change/improvement, tell us how it should work 
-->
   No performance issues in case of 1k parallel changes feed listeners.
   ## Current Behavior
   <!--- If describing a bug, tell us what happens instead of the expected 
behavior -->
   <!--- If suggesting a change/improvement, explain the difference from 
current behavior -->
   It takes minutes to pick-up the latest change in any db
   
   ## Steps to Reproduce (for bugs)
   <!--- Provide a link to a live example, or an unambiguous set of steps to -->
   <!--- reproduce this bug. Include code to reproduce, if relevant -->
   1. create 1k dbs
   2. create 1k  EventEmitter's via 
   ```
   nano.use(dbName).changesReader
                   .start({ includeDocs: true })
                   .on("change", changes => {
                       console.log(`change in ${dbName}: `, changes);
                   })
                   .on('error', (error) => {
                       console.log(` error in ${dbName}`, error);
                   });
   ```
   
   ## Context
   <!--- How has this issue affected you? What are you trying to accomplish? -->
   <!--- Providing context helps us come up with a solution that is most useful 
in the real world -->
   Related use-case - messaging app. Each user has a message db, with outgoing 
and incoming messages. I want to track the changes when I send a message to 
somebody (here the message stored in db via PouchDB - CouchDB sync process), 
lookup the destination and write this message in destination user db.
   ## Your Environment
   <!--- Include as many relevant details about the environment you experienced 
the bug in -->
   * Version used: couchdb:3.1; "nano": "^9.0.3"
   * Operating System and version (desktop or mobile): ubuntu 18.04
   
   


-- 
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:
[email protected]


Reply via email to