Organizing Servers Into Logical Member Groups
In a client/server configuration, by putting servers into logical member groups, you can control which servers your clients use and target specific servers for specific data or tasks. You can configure servers to manage different data sets or to direct specific client traffic to a subset of servers, such as those directly connected to a back-end database.
To add servers to a member group, you can configure the following:
Add the member group names to the
gemfire.propertiesfile for the server. For example:
A server can belong to more than one member group. If specifying multiple group membership for the server, use a comma-separated list. Alternatively, if you are using the
gfshcommand interface to start up the server, provide a group name as a parameter:
gfsh>start server --name=server1 \ --group=Portfolios,ManagementGroup1
To configure a client to connect to a specific member group, modify the client’s
cache.xmlfile to define a distinct pool for each
server-groupand assign the pools to the corresponding client regions:
<pool name="PortfolioPool" server-group="Portfolios" ... <locator host="lucy" port="41111"> ... </pool> ... <region name="clientRegion" ... <region-attributes pool-name="PortfolioPool" ...