Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cross-region node discovery #20

Open
mogarg opened this issue Dec 24, 2017 · 6 comments
Open

Support cross-region node discovery #20

mogarg opened this issue Dec 24, 2017 · 6 comments

Comments

@mogarg
Copy link

mogarg commented Dec 24, 2017

I am running the demo on 2 nodes in different regions with a user with full EC2 access and security group with a configuration of all inbound and outbound traffic. Also, I have given the nodes tags with the same key.

<com.meltmedia.jgroups.aws.AWS_PING
     port_number="7800"
     tags = "Application"
     access_key="**"
     secret_key="****"/>

The tag has the same value on both the nodes. Is this a problem with the chat demo or is this a problem with the AWS discovery?

screen shot 2017-12-23 at 10 28 29 pm

@sorrachai
Copy link

sorrachai commented Dec 26, 2017

Same problem here; I can get them to talk only in the same region. is it possible to make it work for different regions.

@ctrimble
Copy link
Contributor

ctrimble commented Dec 26, 2017

As far as I am aware, the demo should be working. Thank you for raising this issue. I will spin up the demo and see if I can figure out what is wrong. Just to be clear, you state that the instances have matching tag keys, but do they have matching tag key/value pairs? In this case, are the values for the tag Application all the same? Edit: Reread the comment and noticed that you provided this information.

@mogarg
Copy link
Author

mogarg commented Dec 26, 2017

Same as @sorrachai. Can only get them to talk in the same region. I tried this after I discovered a comment in the source code which states that the instances have to be in the same region. I checked the Amazon Java SDK, and it does provides describeTag information across regions. Can we have this as a feature request please?

@ctrimble
Copy link
Contributor

@mogarg and @sorrachai thank you for the details. It is good to know that the demo works in the same region. This seems like a feature request, instead of a bug. I am going to update the title and description so that this issue is focused.

I would be happy to support a PR to get this working the way you want, but I don't know if I have the time to dev and test a solution for you. Would either of you like to take a stab at this?

@ctrimble ctrimble changed the title Chat Demo or AWS Discovery Support cross-region node discovery Dec 27, 2017
@ctrimble
Copy link
Contributor

Just did a quick read to refresh my memory on the exact limitations here. We probably picked this limitation up from the way that security group rules work in EC2 Classic.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html#security-group-rules

@ctrimble
Copy link
Contributor

It seems like a reasonable way to implement this would be to execute an ec2:describeRegions call or have the user provide a list of regions, and then run the ec2:describeInstances queries against all the regions in parallel.

NOTE: I also read the ec2:describeTags call and it does not return the information that is needed to configure the cluster.

Reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants