Cassandra
  1. Cassandra
  2. CASSANDRA-2452

New EC2 Snitch to use public ip and hence natively support for EC2 mult-region's.

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.0.0
    • Component/s: Core
    • Labels:
      None
    • Environment:

      JVM

      Description

      Make cassandra talk identify itself using the public ip (To avoid any future conflicts of private ips).

      1) Split the logic of identification vs listen Address in the code.
      2) Move the logic to assign IP address to the node into EndPointSnitch.
      3) Make EC2 Snitch query for its public ip and use it for identification.
      4) Make EC2 snitch to use InetAddress.getLocal to listen to the private ip.

      1. 2452-Ec2Multi-Region.patch
        4 kB
        Vijay
      2. 2452-Ec2Multi-Region-v3.patch
        7 kB
        Vijay
      3. 2452-EC2Snitch-Changes.txt
        14 kB
        Vijay
      4. 2452-Intro-EC2MultiRegionSnitch-V2.txt
        14 kB
        Vijay
      5. 2452-OutboundTCPConnection.patch
        2 kB
        Vijay

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Cassandra #981 (See https://builds.apache.org/job/Cassandra/981/)
          Ec2 snitch with support for multiple regions.
          Patch by Vijay Parthasarathy, reviewed by brandonwilliams for
          CASSANDRA-2452

          brandonwilliams : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151990
          Files :

          • /cassandra/trunk/src/java/org/apache/cassandra/gms/ApplicationState.java
          • /cassandra/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
          • /cassandra/trunk/src/java/org/apache/cassandra/locator/Ec2MultiRegionSnitch.java
          • /cassandra/trunk/src/java/org/apache/cassandra/gms/VersionedValue.java
          • /cassandra/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
          Show
          Hudson added a comment - Integrated in Cassandra #981 (See https://builds.apache.org/job/Cassandra/981/ ) Ec2 snitch with support for multiple regions. Patch by Vijay Parthasarathy, reviewed by brandonwilliams for CASSANDRA-2452 brandonwilliams : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151990 Files : /cassandra/trunk/src/java/org/apache/cassandra/gms/ApplicationState.java /cassandra/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java /cassandra/trunk/src/java/org/apache/cassandra/locator/Ec2MultiRegionSnitch.java /cassandra/trunk/src/java/org/apache/cassandra/gms/VersionedValue.java /cassandra/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
          Hide
          Vijay added a comment -

          Awesome thanks brandon.... Cant wait for 1.0

          Show
          Vijay added a comment - Awesome thanks brandon.... Cant wait for 1.0
          Hide
          Brandon Williams added a comment -

          Committed.

          Show
          Brandon Williams added a comment - Committed.
          Hide
          Vijay added a comment -

          Changes made as per changes @ 2491...

          Show
          Vijay added a comment - Changes made as per changes @ 2491...
          Hide
          Vijay added a comment -

          rebase to 2491,

          Snitch will automatically set the public IP by querying the AWS API

          Snitch will set the private IP as a Gossip application state.

          Snitch implements IESCS and will reset the connection if it is within the same region to communicate via private IP.

          Implements Ec2Snitch to inherit its functionality and extend it for Multi-Region.

          Operational: All the nodes in this cluster needs to be able to (modify the Security group settings in AWS) communicate via Public IP's both within the region and to the other regions.

          Show
          Vijay added a comment - rebase to 2491, Snitch will automatically set the public IP by querying the AWS API Snitch will set the private IP as a Gossip application state. Snitch implements IESCS and will reset the connection if it is within the same region to communicate via private IP. Implements Ec2Snitch to inherit its functionality and extend it for Multi-Region. Operational: All the nodes in this cluster needs to be able to (modify the Security group settings in AWS) communicate via Public IP's both within the region and to the other regions.
          Hide
          Vijay added a comment -

          Jonathan, yes it overlaps... the idea is to set the private and public address automatically via this patch.... In #2491 The broadcast address is just used for identification similarly to getLocalID()... i think this patch is less intrusive... but if we can commit the other patch i can port this to automatically set the broadcast address...

          Show
          Vijay added a comment - Jonathan, yes it overlaps... the idea is to set the private and public address automatically via this patch.... In #2491 The broadcast address is just used for identification similarly to getLocalID()... i think this patch is less intrusive... but if we can commit the other patch i can port this to automatically set the broadcast address...
          Hide
          Jonathan Ellis added a comment -

          what's the purpose of the new getLocalID / getListernAddress api?

          Is there overlap here with CASSANDRA-2491?

          Show
          Jonathan Ellis added a comment - what's the purpose of the new getLocalID / getListernAddress api? Is there overlap here with CASSANDRA-2491 ?
          Hide
          Vijay added a comment -

          V2 with the recommended way... Thanks!

          Show
          Vijay added a comment - V2 with the recommended way... Thanks!
          Hide
          Jonathan Ellis added a comment -

          Is this a one-size-fits-all solution? It seems to me some people would prefer to continue to use the private interface. Maybe this should be a new snitch class.

          Show
          Jonathan Ellis added a comment - Is this a one-size-fits-all solution? It seems to me some people would prefer to continue to use the private interface. Maybe this should be a new snitch class.
          Hide
          Vijay added a comment -

          EC2Snitch and changes to make the IP Address identification more cleaner and controlled by the snitch which implements it. Tested and it works well..

          There will be a separate follow-up patch to make nodes internally talk in local and public EC2 ip's as needed.

          Show
          Vijay added a comment - EC2Snitch and changes to make the IP Address identification more cleaner and controlled by the snitch which implements it. Tested and it works well.. There will be a separate follow-up patch to make nodes internally talk in local and public EC2 ip's as needed.

            People

            • Assignee:
              Vijay
              Reporter:
              Vijay
              Reviewer:
              Brandon Williams
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development