Managing server connections
TCP connections are a finite resource and need to managed appropriately for an application to perform to expectations, scale to demand and work reliably. Through configuration you can adjust the connection pool, change default timeout values, and enable or disable SSL encryption on the client.
Configuring the client While the client comes with reasonable default configuration settings, sometimes you need to customize the configuration for your unique environment or use case.
Connecting to buckets After you create a ClientConfiguration , you can then connect to a cluster by using the Cluster class.
Closing the connection Both Cluster and IBucket objects implement the IDisposable pattern and also have finalizers. That being said, managing the lifetime of these objects is critical for developing robust, high performance applications. In a typical application, you would create a single, static Cluster object that would live for the duration of the application or the process’s lifetime—create the Cluster object when the application starts and call it’s Dispose method when the application shuts down. Depending upon finalization is not suggested, but admissible in certain applications.
Configuring SSL You can use SSL to secure the data that moves between your application and the cluster.