Database / CouchDB Interview Questions
What are the key CouchDB configuration parameters to tune for production (max_dbs_open, os_process_limit, etc.)?
CouchDB's default configuration targets a single-developer workstation. Production deployments require tuning several parameters across different configuration sections:
| Section / Key | Default | What it controls |
|---|---|---|
| [couchdb] max_dbs_open | 500 | Maximum number of database files open simultaneously. Each open database holds a file descriptor. Increase for servers with many databases; ensure OS ulimits allow it. |
| [couchdb] os_process_limit | 100 | Maximum JavaScript OS processes for the query server (views, VDU). Each concurrent JavaScript request consumes one process. Increase for high-concurrency view workloads. |
| [chttpd] workers | 100 | HTTP request handler pool size. Increase for high concurrent request rates. |
| [couch_httpd_auth] timeout | 600 | Session cookie timeout in seconds. |
| [smoosh] * | various | Auto-compaction daemon thresholds. min_priority controls when a database qualifies for compaction based on data/file size ratio. |
| [rexi] buffer_count | 2000 | Internal message buffer for cluster inter-node RPC. Increase if you see rexi_buffer errors in logs. |
| [fabric] request_timeout | 60000ms | Timeout for cluster-level requests. Increase for slow queries over large datasets. |
OS-level tuning is equally important: set ulimit -n to at least 65535 for file descriptors (each open database + each view index file counts). On Linux, set vm.swappiness=1 to prevent Erlang heap from being swapped. For high write throughput, ensure the storage device has noatime mount option to avoid inode update I/O on every read.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
