Search code examples
amazon-web-servicesamazon-ec2cassandradatagrip

configure cassandra on ec2 to accept remote connection from main OC


everyone. I want to configure cassandra on ec2 to accept remote connection from main OC (using datagrip) so i have a couple of questions. What IP should i use for rpc and listen address? public EC2 ip? What port should I use? default or for rpc? I'm a little bit confused here. Thx in advance.


Solution

  • Basically, the rule of thumb is following:

    • if applications & other nodes are only in the same region, then you can use private IP address for both listen & rpc addresses
    • if applications are outside, or there are other data centers in the other regions, then you set listen to private IP address, broadcast to the public IP, rpc could be set to 0.0.0.0, and broadcast rpc address to public IP

    there is a plenty of documentation available on that topic - just search for something like "cassandra ec2 configuration"