Using Bind Addresses
Using Bind Addresses
You use a bind address configuration to send network traffic through non-default network cards and to distribute the load of network traffic for GemFire across multiple cards. If no bind address setting is found, GemFire uses the host machine's default address.
Host machines transmit data to the network and receive data from the network through one or more network cards, also referred to as network interface cards (NIC) or LAN cards. A host with more than one card is referred to as a multi-homed host. On multi-homed hosts, one network card is used by default. You can use bind addresses to configure your GemFire members to use non-default network cards on a multi-homed host.
Use IPv4 or IPv6 numeric address specifications for your bind address settings. For information on these specifications, see Choosing Between IPv4 and IPv6. Do not use host names for your address specifications. Host names resolve to default machine addresses.
Peer, Server, and Gateway Receiver Communication
You can configure peer, server, and gateway receiver communication so two or more types use the same address or so each communication type uses its own address. If no setting is found for a specific communication type, GemFire uses the host machine's default address.
This table lists the settings used for peer, server, and gateway receiver communication, ordered by precedence. For example, for gateway receiver communication, GemFire searches first for a cache.xml <gateway-receiver> bind-address setting. If that is not set, GemFire searches for the gfsh start server server-bind-address setting, and so on until a setting is found or all possibilities are exhausted.
|Property Setting Ordered by Precedence||Peer||Server||Gateway Receiver||Syntax|
|cache.xml <gateway-receiver> bind-address||X||<gateway-receiver>bind-address=address|
|cache.xml <cache-server> bind-address||X||<cache-server>bind-address=address|
|gfsh start server command-line --server-bind-address||X||X||gfsh start server --server-bind-address=address|
// gemfire.properties setting for peer communication bind-address=184.108.40.206
//cache.xml settings <cache> // Gateway receiver configuration <gateway-receiver start-port="1530" end-port="1551" bind-address="220.127.116.11"/> // Server communication <cache-server bind-address="18.104.22.168" ... <region ...
- On the gfsh command line, specify
the bind address when you start the locator, the same as you specify any
gfsh>start locator --name=my_locator --bind-address=ip-address-to-bind --port=portNumber
- Inside a GemFire application, take
one of the following actions:
- Automatically start a co-located locator using the gemfire property start-locator, and specifying the bind address for it in that property setting.
- Use com.gemstone.gemfire.distributed.LocatorLauncher API to start the locator inside your code. Use the LocatorLauncher.Builder class to construct an instance of the LocatorLauncher, use the setBindAddress method to specify the IP address to use and then use the start() method to start a Locator service embedded in your Java application process.
If your locator uses a bind address, make sure every process that accesses the locator has the address as well. For peer-to-peer access to the locator, use the locator's bind address and the locator's port in your gemfire.properties locators list. For server discovery in a client/server installation, use the locator's bind address and the locator's port in the locator list you provide to in the client’s server pool configuration.
|Pivotal GemFire Locator Processes|