This topic explains how to configure VMware Tanzu GemFire peer-to-peer communication topology.
Use peer-to-peer configuration to set member discovery and communication within a single cluster.
Peer members discover each other using one or more locators.
Note: Locator settings must be consistent throughout a cluster.
To allow peer members to discover each other, add a list of your locators to the gemfire.properties
file as a comma-separated list in the following format:
locators=LOCATOR-1-ADDRESS[PORT-1],LOCATOR-2-ADDRESS[PORT-2]
Where:
LOCATOR-1-ADDRESS
is the address of one of your locators.PORT-1
is the port number to use of the locator at this address.LOCATOR-2-ADDRESS
is the address of another of your locators.PORT-2
is the port number to use of the locator at this address.Example:
locators=mylocator1:8081,mylocator2:8082,mylocator2:8083
To run a standalone member, remove the value of the locators
key in the gemfire.properties
file ass follows:
locators=
You can use logical member groups to deploy JAR applications across multiple members or to execute functions across a member group.
To add a peer to a member group, do one of the following:
Add the member group names to the gemfire.properties
file for the member. For example:
#gemfire.properties
groups=Portfolios,ManagementGroup1
A member can belong to more than one member group. To specify multiple member groups for a member, use a comma-separated list.
Use the gfsh
command interface to start the member, providing the group name or group names as a parameter.
Example gfsh
command to start a server and associate it with member groups:
gfsh>start server --name=server1 \
--group=Portfolios,ManagementGroup1
Example gfsh
command to start a locator and associate it with member groups:
gfsh>start locator --name=locator1 \
--group=ManagementGroup1
After organizing peers into a member group, you can use the member group name to perform tasks such as deploy applications or execute functions.
For example, run the following gfsh
command to deploy an application across a member group:
gfsh>deploy --jar=group1_functions.jar --group=ManagementGroup1