title: Cassandra multi datacenter setup configuration
body: <p>I am looking for some help setting up a multi-datacenter cassandra cluster.  My current setup is MySQL master / slave where MySQL replicates to a disaster-recovery center over the public IP of the remote datacenter and communicates with slaves in the main datacenter via the private IPs.  While VPN'd into the network I can connect to any database via the public IP which is nice for testing / troubleshooting and app servers connect to the database via private IPs.</p>
  
  <p>With Cassandra the disaster recovery center would become a second datacenter.  I'm hoping to get advice on how each datacenter should be configured.  I'm a bit confused over the listen_address and the broadcast_address.  Currently, the seeds in the cassandra.yaml file are the public IPs and everything else is the private IP and this works for the app servers.  If the rpc_address is configured with the private IP or public IP then connections are only accepted on that address.  Connections are accepted via both if the rpc_address is 0.0.0.0 but, in my testing, that causes failover to fail.  I have a java program running that inserts a row and reads it back in a loop.  If the rpc_address is a specific address I can stop a node and the program continues (replication factor of 2 for testing).  If the rpc_address is 0.0.0.0 then the program bombs because it cannot connect to the cluster even tho both node addresses are specified in the Cluster() constructor.</p>
  
  <p>So, with that long lead in, my questions are:</p>
  
  <ol>
  <li><p>What is the recommended configuration for the nodes to communicate with one another over the private IP for a given datacenter but also communicate to the other datacenter over the public IP.  It seems the EC2 Multi snitch accomplishes this but we're not on Amazon's cloud so the code seems specific to amazon.</p></li>
  <li><p>For development and debugging, can developers VPN into our network and connect via the public IP and have the app servers connect on the private IP?  This works fine with rpc_address of 0.0.0.0 however failover doesn't work which was not unexpected given the warning comment in the cassandra.yaml file.</p></li>
  </ol>
  
  <p>I really appreciate the help.</p>
  
  <p>Thanks,
  Greg</p>