glynnbird commented on issue #267:
URL: https://github.com/apache/couchdb-nano/issues/267#issuecomment-842253840


   There's a number of things going on here:
   
   - connection pooling in Node.js - Nano defaults to 50 concurrent connections 
between a client and a server on the same domain name (see 
https://github.com/apache/couchdb-nano/blob/main/lib/nano.js#L25). So even if 
you have 1000 things (in this case changes feed listeners) running, there would 
only be 50 in flight at any one time. Upping this value could give you a faster 
response.
   - how many changes feed can CouchDB handle. That rather depends how big a 
CouchDB cluster you have, the hardware it's running on, the rate of change of 
data, the size of the documents and it will definitely by dependent on the 
number of concurrent changes feeds in flight at any one time. 
   
   In short, if you're relying on this mechanism to scale up your application 
(e.g. one changes-feed/database per user) then eventually you will run out of 
CouchDB capacity. What that number is (100, 1k, 10k, 100k?) is difficult to 
estimate theoretically but you should be able to run experiments to see when 
performance tails off. If you have a fixed number of users (e.g. employees in 
shop) then you might be ok - if you expect numbers to increase over time (like 
a social network), then you might have to go back to the drawing board.


-- 
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