Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:06:15+00:00 2026-06-14T05:06:15+00:00

For my current project, we’ve decided to deploy our application to Amazon’s Elastic Computing

  • 0

For my current project, we’ve decided to deploy our application to Amazon’s Elastic Computing Cloud on some Linux boxes. We use JGroups for group communication and needed a reliable discovery mechanism that didn’t require preconfiguring each application with the addresses of the other cluster members (which is necessary with TCPPING, and ‘sort’ of necessary with TCPGOSSIP). Since we can’t use UDP multicast, that excludes multicast discovery from our options.

We looked into using the S3 Ping protocol, but after reading that there were some reliability issues with it, we decided to roll our own protocol do accomplish this discovery.

I’d love to get some feedback on the simple protocol that we wrote and how it might compare to the S3 Ping. The one limitation it currently has is that it depends on the AWS SDK for Java.

public class EC2Ping extends Discovery {

    private static final Logger log = LoggerFactory.getLogger(EC2Ping.class);

    public static final short EC2_PING_PROTOCOL_ID = 1001;
    private static final int DEFAULT_JGROUPS_PORT = 7800;

    static {
        ClassConfigurator.addProtocol(EC2_PING_PROTOCOL_ID, EC2Ping.class);
    }

    /** The JGroups port number */
    private int port = DEFAULT_JGROUPS_PORT;

    /** The EC2 client */
    private AmazonEC2Client client;

    /** The EC2 instance filters */
    private List<Filter> filters;

    public EC2Ping(EC2Ping src) {
        this.client = src.client;
        this.port = src.port;
    }

    public EC2Ping() {
        // Default constructor
    }

    @Required
    public void setClient(AmazonEC2Client client) {
        this.client = client;
    }

    public void setFilters(List<Filter> filters) {
        this.filters = filters;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getPort() {
        return port;
    }

    @Override
    public Collection<PhysicalAddress> fetchClusterMembers(String cluster_name) {
        List<PhysicalAddress> addresses = new ArrayList<PhysicalAddress>();
        DescribeInstancesRequest request = new DescribeInstancesRequest();
        if (filters != null) {
            request.setFilters(filters);
        }
        DescribeInstancesResult result = client.describeInstances(request);
        for (Reservation res : result.getReservations()) {
            for (Instance instance : res.getInstances()) {
                String ipAddr = instance.getPrivateIpAddress();
                IpAddress addr;
                try {
                    addr = new IpAddress(ipAddr, port);
                    addresses.add(addr);
                } catch (UnknownHostException uhe) {
                    log.error("Unable to resolve cluster member address [" + ipAddr + "]");
                }
            }
        }
        return addresses;
    }

    @Override
    public boolean isDynamic() {
        return true;
    }

    @Override
    public boolean sendDiscoveryRequestsInParallel() {
        return true;
    }
}

I can include my protocol stack configuration if necessary, but it is very similar to UDP except that instead of Multicast discovery, it uses our EC2Ping protocol.

My main questions are as follows:

  1. Does this present a more reliable solution than the S3 Ping?
  2. Does the dependency on the AWS Java SDK negate the usefulness of this solution? (in terms of contributing back to JGroups)

Any comments would be greatly appreciated. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:06:16+00:00Added an answer on June 14, 2026 at 5:06 am

    You may want to have a look at the JGroups AWS Project up on GitHub. It uses the AWS APIs to build clusters using EC2 tags. It also supports instance profiles, so you can get the access key and secret key out of your configuration file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our current project does not use Hibernate (for various reasons) and we are using
My current project is about doing some changes in an already build web application
Our current project at work is a new MVC web site that will use
Our current project has ran into a circular dependency issue. Our business logic assembly
My current project requires extensive use of bit fields. I found a simple, functional
In my current project we're trying to write an application (using SUN RI JSF
Our current project is made up of Python2.3 and wxPython-2.4.1.2. It is working fine.
Current project is an Mvc4 application, I had Ioc working and recently it just
Our current project is written in ASP.NET MVC 1 using mvc-turbines (and unity) for
My current project uses some ListFragments to show rows of data. The rows get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.