-
Notifications
You must be signed in to change notification settings - Fork 26
Description
MULTI_PING allows for multiple discovery protocols to be used in a configuration.
I have an application that needs to support multiple providers: Data Center (TCPPING\ MPING), AWS, GOOGLE_PING, and AZURE_PING Per the original use case of MULTI_PING: "Allow for multiple discovery protocols. This would allow us to use a single configuration which includes discovery protocols for multiple cloud providers." Also see: https://github.com/belaban/JGroups/blob/master/doc/manual/protocols.adoc#multiple-discovery-protocols-in-the-same-stack
I attempted to use it with AWS_PING. Unfortunately at initialization AWS_PING attempts to discover the EC2 Instance's identity and throws an exception if it cannot be found. This does not allow me to utilize MULTI_PING.
Catching and suppressing the exception would allow for MULTI_PING to be used.
Example stack:
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<socket-protocol type="MPING" socket-binding="jgroups-mping" />
<protocol type="TCPPING">
<property name="initial_hosts">host1[7600],host2[7600],host3[7600]</property>
</protocol>
<protocol type="com.meltmedia.jgroups.aws.AWS_PING" module="com.meltmedia.jgroups.jgroups-aws">
<property name="port_number">7600</property>
<property name="port_range">0</property>
<property name="tags">stack_name,role</property>
<property name="filters">instance-state-name=running</property>
</protocol>
<protocol type="MULTI_PING">
<property name="async_discovery">true</property>
</protocol>
<protocol type="MERGE3"/>
<socket-protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="MFC"/>
<protocol type="FRAG3"/>
</stack>Expected behavior: If not in AWS MPING or TCPPING would be used in the Data Center.
Actual behavior: When not in AWS, AWS_PING throws an exception and Wildfly fails to use the other JGroups discovery protocols