Does CouchDB supports caching out of the box or do I have to manually have a caching proxy in front of it like Squid?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short answer: No.
Long answer: Yes?
The whole philosophy of CouchDB is to think about everything that might be queried later, compute it now (when it’s convenient), and store the result in an index. All data access from CouchdB comes from scanning one of these indexes, which is very fast and tends to take roughly the same amount of time regardless of the amount of data (logarithmic time actually.)
Furthermore, CouchDB does not use much memory, because it expects the operating system to cache its disk operations. The filesystem cache provides huge a huge performance benefit.
Finally, CouchDB supports all the web standards for caching, so browsers and ISPs often cache parts of it without anybody doing anything special.
I suppose my point is that for high read load, CouchDB often does not need a cache.
However, no, there is no out-of-the-box cache feature. One reason CouchDB uses HTTP is to allow people to use standard tools to solve their problems. Many people do use caching web proxies in front of CouchDB in production.