2
  1. Is there any limit on server on serving number of requests per second or number of requests serving simultaneously. [in configuration, not due to RAM, CPU etc hardware limitations]
  2. Is there any limit on number of simultaneous requests on an instance of CouchbaseClient in Java servlet.
  3. Is it best to create only one instance on CouchbaseClient and keep it open or to create multiple instances and destroy.
  4. Is Moxi helpful with Couchbase 1.8.0 server/Couchbase java client 1.0.2

I need this info to setup application in production.

Thanks you

hridayesh
  • 1,123
  • 1
  • 14
  • 36

1 Answers1

2
  1. The memcached instance that runs behind Couchbase has a hard connection limit of 10,000 connections. Couchbase in general recommends that you should increase the number of nodes to address the distrobution of traffic on that level.
  2. The client itself does not have a hardcoded limit in regards to how many connections it makes to a Couchbase cluster.
  3. Couchbase generally recommends that you create a connection pool from your application to the cluster and just re-use those connections versus creation and destroying them over and over. On heavier load applications, the creation and destruction of these connections over and over can get very expensive from a resource perspective.
  4. Moxi is an integrated piece of Couchbase. However, it is generally in place as an adapter layer for clients developers to specifically use it or to give legacy access to applications designed to directly access a memcached interface. If you are using the Couchbase client driver you won't need to use the Moxi interface.
Drahkar
  • 1,694
  • 13
  • 17
  • Note that 10k connections is not a "hard" limit, but it's not a common thing to override. Also note that increasing the number of nodes won't necessarily help, as each client is connected to every server. – Matt Ingenthron Apr 29 '12 at 20:12
  • Thanks a lot for answering. My main concern is to scale the application. I am using Couchbase java client with Jetty server. Is only one instance of couchbase client is enough or I need to create a pool of client. In later case is there any library to do that? – hridayesh May 01 '12 at 04:26
  • @hridayesh - You should create a pool of connections per app, though generally 5 or so connections is more than enough for the average application. – Drahkar May 01 '12 at 13:44
  • @MattIngenthron - The hard limit is in memcached within Couchbase. The only way to change it is to build a wrapper that couchbase runs, modifies the command being run by erlang and then runs the actual memcached program with the new connection limit. Also each client does not hold a connection to every node within the cluster. It makes a call to the first server, is given the vbucket map and then uses that map to connect to one of the nodes based off an internal loadbalancing system that is part of Couchbase. – Drahkar May 01 '12 at 13:44
  • @Drahkar the connections are definitely persistent. It's not "one of the nodes", it's the node that particular key is destined for. I know what I'm talking about, I'm the main developer these days behind the Couchbase Java Client and the spymemcached client. I designed the REST interface between the server and the clients. I know how it works. :) I do not recommend pooling client objects in most situations. – Matt Ingenthron May 11 '12 at 16:48
  • I need to increase the number of connections per node. I understand that it is possible but I have not seen instructions for doing it. Under high load we do reach the max number of connections (9000), this is on Couchbase 2.2.0. I want to do exactly this: "... build a wrapper that couchbase runs, modifies the command being run by erlang and then runs the actual memcached program with the new connection limit." – James McGill Oct 19 '15 at 17:20