Can a number of scripts (maybe ~50) have simultaneous session to the Cassandra DB? Can any of clients be denied from connection?
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
@naraen.grm_191651, usually for a given app instance, there will just be a single session. For a given session, there will be one connection pool per connected node. The number of connection pool is configurable. I am not sure which driver that you use today, but let's assume it is DataStax Java Driver for this example and you could refer to this connection pooling documentation to understand it further. Hope that gives you an idea here.
p/s: See this documentation page for all of the available CQL Drivers.
Yes, it is possible to have lots of clients connected to a cluster. This is very common for a microservices environment where there could be a hundred app instances all connecting to the same Cassandra instance.
Multiple app instances are in fact recommended in order to maximise the throughput of the cluster because a single (or small number of) client instances can be the bottleneck. It is important to scale out the app instances as well to spread the load.
The maximum number of concurrent connections to the cluster is only limited by the number of nodes in the cluster. For example in a 50-node cluster, it is not unusual to have a hundred or more connected app instances. Cheers!
9 People are following this question.