This is a prerelease version.

View latest

Advanced Network Configuration

In Hazelcast, you can configure Hazelcast members with separate server sockets, applying distinct network configurations for various protocols. This feature is known as the Advanced Network and it supports Member, Client, REST, Memcache, and WAN protocols.

In the Hazelcast Platform Operator, advanced networking configuration is enabled by default, and certain protocol properties are pre-configured:

  • For Client protocol the port number is 5701.

  • For Member protocol the port number is 5702.

  • For REST, port number is 8081 and Persistence, HealthCheck and ClusterWrite endpoint groups enabled by default.

  • For WAN, default port number is 5710.

You can configure Member and Client Protocol interfaces as well as WAN Protocol socket ports using the Hazelcast Platform Operator.

Configuring Member and Client Protocol Interfaces

This is an example configuration for setting up interfaces using the Hazelcast Platform Operator:

Example Configuration
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
  name: hazelcast-sample
spec:
  clusterSize: 3
  repository: 'docker.io/hazelcast/hazelcast-enterprise'
  version: '5.4.0-slim'
  advancedNetwork:
    memberServerSocketEndpointConfig:
      interfaces:
      - 10.10.1.*
    clientServerSocketEndpointConfig:
      interfaces:
      - 10.10.3.*

Configuring WAN Protocol Sockets

The following example shows a configuration for setting up WAN sockets using the Hazelcast Platform Operator:

Example Configuration
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
  name: hazelcast-sample
spec:
  clusterSize: 3
  repository: 'docker.io/hazelcast/hazelcast-enterprise'
  version: '5.4.0-slim'
  advancedNetwork:
    wan:
    - name: istanbul
      port: 5710
      portCount: 5
      serviceType: LoadBalancer

Possible values for serviceType are: ClusterIP and LoadBalancer. After applying this example configuration, there will be 1 service created with a type of LoadBalancer which exposes 5 ports: 5710, 5711, 5712, 5713, 5714. If you don’t provide a serviceType, it will be set to LoadBalancer by default.

In case WAN Replication configuration is not provided in advancedNetwork configuration, port number 5710 will be configured for WAN Replication by default.

You can use the following command 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-0   WAN    34.72.248.220:5710
hazelcast-sample-istanbul-1   WAN    34.72.248.220:5711
hazelcast-sample-istanbul-2   WAN    34.72.248.220:5712
hazelcast-sample-istanbul-3   WAN    34.72.248.220:5713
hazelcast-sample-istanbul-4   WAN    34.72.248.220:5714