I am using node server for the backend. Connection to Cassandra is done using cassandra-driver nodejs.
Connection is done as follows:
const client = new cassandra.Client({
contactPoints: ['h1', 'h2'],
localDataCenter: 'datacenter1',
keyspace: 'ks1'
});
- In contactPoints, do I just need to add 'seed' nodes or can I can add any nodes from the datacenter?
- Do I need to run separate backend service for each datacenter? Or is there a way to connect multiple datacenter from the same nodejs backend service?
- Any recommended way for setting backend server such that bandwidth can be minimized between Cassandra nodes and backend server? Should backend server run on the same machine where one of the Cassandra node is running so that data won't need to travel between multiple machines? Or is it fine if backend server runs on a completely separate machine than Cassandra node? Here, for example, if AWS EC2 is used, then data transfer charges might increase due to data flow between Cassandra node and backend server.
