How to know Native Clients connected to Cassandra

3.1k Views Asked by At

I am able to see 160 Native clients on a particular node from OpsCenter. But none of the application is pointing to this DC or any of the nodes from this DC.

If above is the situtation what are those 160 Native clients?

  • Few of them are because I have connected to that node using DevCenter.
  • Rest can be because of Inter DC communication??
  • No keyspace has RF set also for this DC. I am about to decommission this DC.

OpsCenter Native Clients

But not sure what are those clients.

Any idea??

2

There are 2 best solutions below

1
Anil Kapoor On BEST ANSWER

I have used below command to find connecting clients:

sudo lsof -i -n -P | grep 9042 | grep ESTABLISHED

By running above, I found processes & those processes were all the java applications connecting to Cassandra. But I have not mentioned any of these hosts in connection, still requests were coming on them.

I found all those requests were because of Consistency Level: QUORUM by client applications. Although applications are not referring to those DCs directly but to achieve QUORUM requests were going on all DCs.

1 more thing was there: Java client aplications were using username(superuser) 'cassandra', this also need consistency level QUORUM.

Inter DC communication does not happen on 9042, so my assumption of some connections from Inter DC was also not correct.

Above was solution to my problem.

2
Chris Lohfink On

In latest versions you can use nodetool clientlist or select * from system_views.clients ; in cqlsh to view the actual connections. This will give you the host and port which you can then track on the system what application is bound to it.

In older DSE versions you can also use dsetool perf userlatencytracking [enable|disable] to enable the userlatency tracking to do something similar with select * from dse_perf.user_io;.