Configure a Grid as a Membership Service Client

A grid must know how to connect to each of the membership servers. Thus, you must provide a ZooKeeper client configuration file to the ttGridAdmin utility when you create a grid that details all of the membership servers. You can name the ZooKeeper client configuration file with any prefix as long as the suffix is .conf.

The ZooKeeper client configuration file specifies all membership servers that coordinate with each other to provide a membership service. Within the client configuration file is a single line with the Servers parameter that provides the DNS (or IP address) and client port numbers for each membership server. The configuration information for these hosts must:

  • Use the same DNS (or IP address) as what you specified in the server.x parameters in each of the individual zoo.cfg files on each membership server.

  • Provide the same client port number as what is specified in the clientPort parameter specified in each of the individual zoo.cfg files on each membership server.

In our example, we use the membership.conf file as the ZooKeeper client configuration file. For this example, there are three hosts that support three membership servers, where ms_host1 listens on client port 2181, ms_host2 listens on client port 2181, and ms_host3 listens on client port 2181.

Servers ms_host1!2181,ms_host2!2181,ms_host3!2181

A grid knows how to reach these membership servers because the ZooKeeper client configuration file is provided as an input parameter when you create your grid. See Creating a Grid.

Once you provide the ZooKeeper client configuration file to the ttGridAdmin command when a grid is created, the ZooKeeper client configuration file is no longer needed and can be discarded.

Note:

You can modify the list of provided membership servers for a grid by importing a new list of membership servers. See Reconfiguring Membership Servers.