You can configure Hazelcast members with separate server sockets, applying distinct network configurations for various protocols. This is known as advanced network configuration and supports Member, Client, REST, Memcache, and WAN protocols.
In Operator, advanced network configuration is enabled by default, and certain protocol properties are pre-configured:
-
For the Client protocol, the port number is
5701. -
For the Member protocol, the port number is
5702. -
For REST, the port number is
8081andPersistence,HealthCheckandClusterWriteendpoint groups are enabled by default. -
For WAN, the port number is
5710.
You can configure Member and Client Protocol interfaces as well as WAN Protocol socket ports using Operator. Operator does not support updating REST or Memcache configuration.
Configure Member and Client protocol interfaces
The following example sets up interfaces using Operator:
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast-sample
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast-enterprise'
version: '5.6.0-slim'
advancedNetwork:
memberServerSocketEndpointConfig:
interfaces:
- 10.10.1.*
clientServerSocketEndpointConfig:
interfaces:
- 10.10.3.*
Configure WAN sockets
W The following example sets up WAN sockets using Operator:
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast-sample
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast-enterprise'
version: '5.6.0-slim'
advancedNetwork:
wan:
- name: istanbul
port: 5710
serviceType: LoadBalancer
After applying this example configuration, a single service is created with a type of LoadBalancer, which exposes port 5710. If you don’t provide a serviceType, it is set to LoadBalancer by default.
If a WAN Replication endpoint configuration is not provided in the advancedNetwork configuration, port number 5710 will be configured by default and exposed on the discovery service only.
|
Possible values for serviceType are: ClusterIP, NodePort, LoadBalancer, and WithExposeExternally. The values of ClusterIP, NodePort, and LoadBalancer create a new dedicated service for the WAN and expose the provided ports through this service. In contrast, WithExposeExternally exposes WAN ports on the existing member services, allowing WAN clients to use the service-per-pod topology.
The WithExposeExternally service type requires Hazelcast Platform version 5.5 or later.
|
You can use kubectl to list the external addresses of the WAN endpoints of the cluster:
kubectl get hazelcastendpoint --selector="app.kubernetes.io/instance=hazelcast-sample"
NAME TYPE ADDRESS
hazelcast-sample-istanbul WAN 198.51.100.220:5710