6.6. Configuring XDCR Using Node Ports for Replication

Documentation

VoltDB Home » Documentation » VoltDB Kubernetes Administrator's Guide

6.6. Configuring XDCR Using Node Ports for Replication

Kubernetes node ports are another option for providing external access to the VoltDB cluster for replication. Node ports are similar to load balancers in that they provide an externally accessible network address for individual ports. Node ports are different in that the addresses are transitory — the address and/or port number will change as pods come and go. So node ports are less practical for the Network Discovery phase. However, they can be a cheap alternative for providing external access during the replication phase, since the cluster can advertise the new addresses as its topology changes.

It is also possible to mix and match solutions. So a single load balancer can be used to provide the Network Discovery service for a cluster, while node ports provide per pod network addresses for the replication phase, as described next.

Again, you start by assigning the DR id and role as Helm properties and, if known in advance, the source for the remote cluster:

cluster:
  config:
    deployment:
      dr:
        id: 1
        role: xdcr
        connection:
          enabled: true
          source: "chicago-dc-2"  # Remote cluster

You then define the load balancer for Network Discovery by setting the values of the cluster.serviceSpec.dr properties enabled to true and type to LoadBalancer.

cluster:
  serviceSpec:
    dr:
      enabled: true
      type: LoadBalancer

Finally, define the replication phase as using node ports by configuring cluster.serviceSpec.perpod properties type to NodePort and dr.enabled to true. You can also use the dr.startReplicationNodePort property to specify the starting port number for the externally accessible ports assigned to the node ports.

cluster:
  serviceSpec:
    perpod:
      type: NodePort
      dr:
        enabled: true
        startReplicationNodePort: 33111