Connection pool for couchdb

2019-07-28 06:28发布

I have one couchdb database and I am querying it in parallel. Now, I want to create a connection pool, because I discovered a bottleneck in my design - I was using a single instance of couchd , so parallelization was failing due to that.

I searched the web for connection pool implementations, but I was not able to find a proper java connection pool implementation for couchdb - most of the frameworks support relational databases. I will be appreciated if someone can help me for that.

2条回答
SAY GOODBYE
2楼-- · 2019-07-28 07:07

If you are searching for a simple way to load-balance multiple CouchDB instances, why not use an HTTP load balancer like Varnish? Take a look here on how you can set up a simple round-robin load balancer. You can also disable caching if it's undesirable.

查看更多
神经病院院长
3楼-- · 2019-07-28 07:19

I've never used a couchdb connection pool, but you may have some luck with this:

http://commons.apache.org/pool/

It lets you pool any old object, including connections. It'll take a few lines of code to get it working for you though.

Hope this helps, Nate

查看更多
登录 后发表回答