0
votes

I am using Twitter's Cassandra client https://github.com/twitter/cassandra for my Ruby on Rails application.

What's the best way to connect to a cluster vs a single node? The getting started documentation has the following sample code:

client = Cassandra.new('Twitter', '127.0.0.1:9160')

That's fine and all in a single node setup, but what does a connection string look like when you have a cluster? What if a node goes down, is the client smart enough to discontinue speaking to nodes that are up and running?

1

1 Answers

1
votes

Checking into the sourcecode, the initializer seems to accept an array of server:port strings

client = Cassandra.new('Twitter', ['127.0.0.1:9160', '127.0.0.1:9161', '127.0.0.1:9162'])

Not sure about Cassandras behavior, when a node dies