Connection creation/teardown costs..
Tue, 11/22/2011 - 07:43
How expensive or problematic is it for a client to open and then subsequently close connections to Membase only for the duration of the request/response (as opposed to having a constant connection to the server?)
I ask because the request/response paradigm aligns more closely to our evaluation use case, which is using it to store session data.
The quick answer is it's not that bad, and many people do that exactly. You may wish to configure the bucket to be running on a particular port or use a client side moxi so you don't have the SASL auth overhead (must be done before each connection). In fact, in either of these cases, especially the client side moxi case, you are really minimizing the overhead for that initial connection establishment.
Have a look at http://docs.couchbase.org/moxi-manual-1.7/moxi-standalone.html