Quantcast
Channel: DataStax Support Forums » Recent Topics
Viewing all articles
Browse latest Browse all 387

HornedBeast on "Connecting to Cassandra Cluster"

$
0
0

I'm just getting started with Cassandra and had a few questions. I'm going to be deploying a 4 node cluster on AWS as per the DataStax documentation (http://www.datastax.com/docs/datastax_enterprise3.1/install/install_dse_ami).

Once I have this 4 node cluster up and running, i'll be creating a simple LAMP server which will (hopefully) do the querying to the cluster. I'll be using Cassandra-PDO for the communication (http://code.google.com/a/apache-extras.org/p/cassandra-pdo/). This totals 5 servers in the end.

For example:

192.168.0.1 - Cassandra1
192.168.0.2 - Cassandra2
192.168.0.3 - Cassandra3
192.168.0.4 - Cassandra4
192.168.0.5 - LAMP Stack

How do I balance all my requests from the LAMP server to my Cassandra cluster? In the CPDO example, they mention the following:

$dsn = "cassandra:host=192.168.0.1;port=9160,host=192.168.0.2,port=9160";

However, what do I do if I don't know what the IP's are? What happens if I add new nodes? Old nodes fail, etc etc? Do you have to somehow load balance the requests yourself?

Any advice on the above would be hugely appreciated!

Cheers


Viewing all articles
Browse latest Browse all 387

Trending Articles