Steps to Plan and Configure a GemFire XD Deployment

Work with your host system administrators to plan your overall deployment strategy. Create a detailed list of the machines and communication ports that your GemFire XD peer and server members will use. Your deployment decisions determine how servers and peers find each other and distribute data in the cluster.

The following steps are high-level tasks for planning and configuring your deployment. Where necessary they provide links to more detailed procedures.

  1. Decide whether to use locators or a multicast address for member discovery. Locators are recommended for production systems, and are required for implementing security, network partition management, and thin client load balancing. See Configuring Discovery Mechanisms.
    If you choose to use multicast for discovery, record the unique multicast address and port for each separate cluster you intend to deploy.
    Note: Use different port numbers for different clusters, even if you already use different multicast addresses. Some operating systems do not separate communication between systems that have unique addresses but the same port number.
  2. Identify the host machines to use for locators and datastores:
    • To ensure the most stable startup and availability, use at least two locators that run on different computers.
    • The number of datastores that you deploy is determined by the amount of data you want to manage in-memory, as well as the degree of partitioning and redundancy you want to provide for table data. For guidelines on memory capacity planning, see Overview of Memory Capacity Planning.
    • For each host machine with more than one network adapter card, decide whether to use the default network address or one or more non-default bind addresses. You can use different cards for peer communication and client connections.
    • Create a list of your locators' address and port pairs. You will use this list to configure other clustered GemFire XD peer clients or servers, thin client connections, and the locators themselves.
  3. Create a basic configuration for each GemFire XD member:
    1. Ensure that the /etc/hosts correctly configures the host and IP address of each GemFire XD member machine. Also ensure that the file is deployed to all machines that will host GemFire XD members. By default locators use configured hostnames to connect clients to members of the distributed system, rather than IP addresses.
    2. On each host machine, create a new member working directory for each GemFire XD member that you want to run the host. The member working directory provides a default location for log, persistence, and status files for each member, and is also used as the default location for locating the member's configuration files. For example, if you want to run both a locator and server member on the local machine, create separate directories for each member:
      $ mkdir /opt/pivotal/gemfirexd/locator1 /opt/pivotal/gemfirexd/server1
    3. Create a file in each member directory, to configure boot properties for that member. The file makes it easy to configure boot properties that are common to all members of the distributed system, such as properties for member discovery or authentication configuration. For example, all members of the distributed system should identify the full list of locator addresses and port numbers used for member discovery, so a common entry to all would be similar to:

      If you use multicast for discovery, specify the multicast address and port to use in the file for each member.

      See Using Additional Boot Properties for more information.

  4. Create a startup script for each GemFire XD member, to ensure repeatable startup behavior for the distributed system. Individual startup scripts can be tailored to supply member-specific boot options, such as:
    • the member's working directory
    • the bind address to use for client connections
    • the port number to use for client connections.

    Note that many startup options can also be defined in the file.

    The following listing shows a sample startup script that starts a local locator member in the specified directory:
    gfxd locator start -dir=/opt/pivotal/gemfirexd/locator1 -client-port=1527
    This listing shows a sample script to start a server member on the same machine:
    gfxd server start -dir=/opt/pivotal/gemfirexd/server1 -client-port=1528
    Note that both of these scripts assume that a locators boot property is specified in the file in each member's working directory, as described in the previous step. As an alternative, you could include the locators option directly in the startup script:
    gfxd server start -dir=/opt/pivotal/gemfirexd/server1 -client-port=1528 -locators=localhost[10334]

    See Starting and Stopping GemFire XD Members for more information about the commands used to start GemFire XD members.

    Note: On Linux systems, you can optionally choose to modify and use the default GemFire XD service script that is installed with the software. See Using Linux Service Scripts to Start and Stop Members.
  5. Start the distributed system and verify connectivity:
    1. Always use your configured startup scripts or gfxd commands to start locator members as the first members of the distributed system. See Using Locators.
    2. Start datastore members next, using your member startup scripts. See Starting and Stopping GemFire XD Members.
    3. Connect to a locator member using a thin client connection, to verify connectivity to your system. See Connect to a GemFire XD Server with the Thin Client JDBC Driver.
  6. Modify the existing properties files and startup scripts to implement advanced GemFire XD features:
  7. If necessary set up replication between multiple GemFire XD clusters. See Configuring Multi-site (WAN) Deployments.
  8. Periodically monitor your product usage, to verify that you are in compliance with your GemFire XD license. See Product Usage Logging.