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.5.2-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.5.2-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.

In case WAN Replication endpoint configuration is not provided in advancedNetwork configuration, port number 5710 will be configured for WAN Replication endpoint by default. It will be 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 serviceType requires Hazelcast version 5.5 or later.

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   WAN    34.72.248.220:5710