0

I am currently doing the feasibility testing with Cassandra 2.0.9. During the test, it was observed that the client that connects to a cluster with IP address of seed node, loses the connection, when the seed node crashes.

For detail, the cluster has two nodes with IP 1.1.1.1 and 2.2.2.2 with 1.1.1.1 as a seed.

(1) client A connects with 1.1.1.1. (2) the seed node 1.1.1.1 crash (3) client A loses the connection (4) never restores even after the seed node restarts.

client kept wroking okay without an issue in following situation. +client connects with 2.2.2.2 and any of node crashes.

Should I not use seed node IP for client configuration??

How IP of clients should be configured for the cassandra cluster, if there are many clients and multiple Cassandra nodes.

I am satisfied with the performance, but Cassandra seems to have some loose ends.

Thanks in advance.

Joshua
  • 1

1 Answers1

0

Seed node is nothing special in Cassandra -- the only difference between a seed and a normal node is that each node in the cluster should know the seed(s) IP in bootstrap phase. So first rule of a cluster is never set only one node as seed because if it is not reachable and some other nodes attempts to join the cluster they won't be able to (I know your was just an example, but it's a good rule to remember). To answer first question: you can set a seed node for ip client configuration.

As far as your test you did not specify the client you're using -- assuming you're on official Java Driver you should tell the driver how you want him to attempts new connections when a node die and what to do if a read fails due to a TimeoutException | UnavailableException

Give a look at ReconnectionPolicy and RetryPolicy, maybe default values don't meet your needs.

HTH, Carlo

Carlo Bertuccini
  • 19,615
  • 3
  • 28
  • 39