2.3. Changing the bind address for Data Grid Server
Data Grid Server binds to a network IP address to listen for inbound client connections on the Hot Rod and REST endpoints. You can specify that IP address directly in your Data Grid Server configuration or when starting server instances.
Prerequisites
- Have at least one Data Grid Server installation.
Procedure
Specify the IP address to which Data Grid Server binds in one of the following ways:
Open your Data Grid Server configuration and set the value for the
inet-addresselement, for example:<server xmlns="urn:infinispan:server:16.0"> <interfaces> <interface name="custom"> <inet-address value="${infinispan.bind.address:192.0.2.0}"/> </interface> </interfaces> </server>Use the
-boption or theinfinispan.bind.addresssystem property.Linux
bin/server.sh -b 192.0.2.0Windows
bin\server.bat -b 192.0.2.0
2.3.1. Listening on all addresses リンクのコピーリンクがクリップボードにコピーされました!
If you specify the 0.0.0.0 meta-address, or INADDR_ANY, as the bind address in your Data Grid Server configuration, it listens for incoming client connections on all available network interfaces.
Client intelligence
Configuring Data Grid to listen on all addresses affects how it provides Hot Rod clients with cluster topology. If there are multiple interfaces to which Data Grid Server binds, then it sends a list of IP addresses for each interface.
For example, a cluster where each server node binds to:
-
10.0.0.0/8subnet -
192.168.0.0/16subnet -
127.0.0.1loopback
Hot Rod clients receive IP addresses for server nodes that belong to the interface through which the clients connect. If a client connects to 192.168.0.0, for example, it does not receive any cluster topology details for nodes that listen on 10.0.0.0.
Netmask override
Kubernetes, and some other environments, divide the IP address space into subnets and use those different subnets as a single network. For example, 10.129.2.100/23 and 10.129.4.100/23 are in different subnets but belong to the 10.0.0.0/8 network.
For this reason, Data Grid Server overrides netmasks that the host system provides with netmasks that follow IANA conventions for private and reserved networks:
-
IPv4:
10.0.0.0/8,100.64.0.0/10, 192.168.0.0/16`,172.16.0.0/12,169.254.0.0/16and240.0.0.0/4 -
IPv6:
fc00::/7andfe80::/10
See RFC 1112, RFC 1918, RFC 3927, RFC 6598 for IPv4 or RFC 4193, RFC 3513 for IPv6.
You can optionally configure the Hot Rod connector to use the netmask that the host system provides for interfaces with the network-prefix-override attribute in your Data Grid Server configuration.