Search code examples
javacluster-computingjgroups

Is JGroups intended for local use only (LANs), or can it coordinate hosts across the internet?


Given JGroups’ seeming default to using multicast, I'm wondering if it's purpose is to coordinate a cluster of hosts/nodes locally in a LAN. Or is JGroups practical for coordinating across the internet such as between servers housed in coloslocated in different geographical regions?


Solution

  • JGroups provides protocols to support pretty much any installation scenario and can be used locally in a LAN or across the internet. Typically you would create a local cluster of nodes and then bridge them to another cluster of nodes located elsewhere.

    The JGroups documentation is pretty good at describing the scenarios. The protocols to look at are RELAY and RELAY2.

    I also came across a blog post written a few days ago describing Clustering Liferay globally across data centers with JGroups and RELAY2. A real world scenario that makes interesting reading.