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

 

question

naraen.grm_191651 avatar image
naraen.grm_191651 asked Erick Ramirez answered

Can 50 clients be connected simultaneously to a Cassandra DB?

Can a number of scripts (maybe ~50) have simultaneous session to the Cassandra DB? Can any of clients be denied from connection?

java driver
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

smadhavan avatar image
smadhavan answered

@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.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered

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!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.