Friday, November 1, 2013

How to limit number of connections to cassandra server - WSO2 BAM2

We might need to limit number of connections to cassandra server due to some fine tuning purposes. Here we will see how we can do that.

For this we can use rpc_max_threads parameter. Description about rpc_max_threads as follows.
"Cassandra uses one thread-per-client for remote procedure calls. For a large number of client connections, this can cause excessive memory usage for the thread stack. Connection pooling on the client side is highly recommended. Setting a maximum thread pool size acts as a safeguard against misbehaved clients. If the maximum is reached, Cassandra will block additional connections until a client disconnects."

So we can use this parameter to limit number of active connections.

So you need to edit repository/conf/etc/cassandra.yaml file and edit  rpc_max_threads property with desired value.

No comments:

Post a Comment