How can I use FILE_PING as discovery protocol for JGroups and is it supported for productional use?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- Red Hat Data Grid (RHDG)
Issue
- as described in Content from www.jgroups.org is not included.JGroups manual can we use FILE_PING for membership discovery in JGroups?
- Is FILE_PING a supported protocol in EAP 7.1 and can we use it in production environments?
- How to configure FILE_PING as discovery protocol?
- If multicasting is no option for the network the TCPPING can be used, but the initial_host attribute need to be changed on all nodes for every cluster change. Is it possible to use the FILE_PING instead?
Resolution
FILE_PING is a valid discovery protocol for JGroups, it is supported and can be used in any environment.
A thing to remember is that this format is the base for other detection protocols if used in OpenShift, Cloud, Container...
But it is not used that often as the recommended discovery protocols PING, MPING and TCP_PING or the Cloud discovery S3_PING, KUBE_PING, so there is probably not a lot of real world testing.
One possible issue could be the availability of the file and the access to it if shared via network links. This might add another point of complexity and single point of failure to the detection.
The configuration need to have a location which is shared for all cluster members like followed:
<protocol type="FILE_PING">
<property name="location">/shared/FilePing/myCluster</property>
</protocol>
The property remove_all_data_on_view_change is recommended to set to true as well as to remove outdated files.
Note: Before EAP 7.2.x this property was named remove_all_files_on_view_change instead.
The directory is used by each member of the cluster for the following
- Each member writes its local and physical address mappings to a file.
- A new member reads all files and sends the discovery request to all addresses resulting from this.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.