Couchbase Connection Polling

Is there a doc that explains connection pooling bets practices via the SDK.
We have application services that auth with LDAP each and every session … feels like this should be part of a pool that authenticates on startup … but then holds the pool for a set time.

thanks

Any body :slightly_smiling_face:
@ingenthr
@graham.pople
@simonbasle

Hi johnfak,

Is Managing Connections using the Java SDK with Couchbase Server the document you’re looking for? Some highlights:

  • Always create only one instance of a CouchbaseCluster and share it across threads (same with buckets).
  • The SDK is thread-safe, so no additional synchronization is needed when interacting with the SDK.
  • If different clusters need to be accessed, reuse the CouchbaseEnvironment (See Scalability and Concurrency).

If your question is specifically about the connections between Couchbase Server and the LDAP server used for authentication, then that’s beyond the scope of the SDK. I’d steer you to the LDAP docs and the section of the forum dedicated to Couchbase Server.

Thanks,
David

@david.nault
Sorry for delay and thanks for update.

The part I wqould like to understand better is the thread management settings by default and things around TCP keepalive for query nodes , data nodes … so on.

thanks !!

Michael Nitchinger wrote an article called Inside the Java SDK: Connection Management that goes into lots of detail.

Keepalive intervals are configurable, documented on the Client Settings for the Java SDK page.

Thanks,
David

Thanks David.

We are having an issue with our LDAP. Until resolved - impacts our system.

What we dont understand is why we are authenticating with LDAP so often to then hit the ldap issue … its like the threads within the default pool are torn down and a new full connection reestablished with AUTH each time or at least very often.

Will look over these.