|Managing Your Data in GemFire XD / Using Server Groups to Manage Data Distribution|
A server group defines a subset of GemFire XD data store members. You can use server groups to control which data stores host data for a table or deploy listener implementations in the distributed system.
Any number of GemFire XD members that host data can participate in one or
more server groups. You specify named server groups when you start a GemFire XD
A GemFire XD member that is booted with
host-data=false is an accessor and does not host table
data, even if you specify one or more server groups. However, peer clients that
host data can also participate in server groups.
By default, all servers that host data are added to the "default" server group.
Different logical database schema are often managed in different server groups. For example, an order management system might manage all customers and their orders in an "Orders" schema deployed to one server group. The same system might manage shipping and logistics data in a different server group. A single peer or server can participate in multiple server groups, typically as a way to colocate related data or to control the number of redundant copies in replicated tables.
With support for dynamic group membership, the number of processes hosting data for a server group can change dynamically. However, this dynamic aspect of server group membership is abstracted away from the application developer, who can look at a server group as a single logical server.
Server groups only determine those peers and servers where a table's data is being managed. Tables are always accessible for any peer member of the distributed system, and from thin clients that connect to a single server. Data stores that are not a member of one of the table's server groups act as accessors when performing operations against the table.
When you invoke server side procedures, you can parallelize the execution of the procedure on all members in the server group. These data-aware procedures also execute on any peer clients that belong to the server groups.
Without associating tables to specific member IP addresses, the capacity of a server group can be dynamically increased or decreased without any impact to existing servers or client applications. GemFire XD can automatically rebalance the tables in the server group to the newly added members.
At least one data store member that hosts data for the table must be available in order to execute statements against the table. If all data stores in all of the table's server groups are offline, then statements involving the table fail with ERROR X0Z08: No Datastore found in the Distributed System for 'statement'.