Skip to content

Strong consistency for Aerospike on Kubernetes

This page explains how to configure a strong consistency (SC) namespace in the AerospikeCluster custom resource (CR). In SC mode, database writes either complete or fail, with no partial writes. When you use AKO to manage an SC namespace, AKO manages the roster and validates unavailable or dead partitions before actions like rolling restarts or scaling down.

Set up an SC namespace

  1. Add the strong-consistency: true parameter in the namespace section of the CR file.

    aerospikeConfig:
    namespaces:
    - name: test
    replication-factor: 2
    strong-consistency: true
    storage-engine:
    type: device
    devices:
    - /test/dev/xvdf

    For the full CR file, see the strong consistency example in the main Aerospike Kubernetes Operator repository.

  2. Save and exit the CR file, then apply the change with kubectl.

    Terminal window
    kubectl apply -f aerospike-cluster.yaml
  3. Verify that AKO applied the namespace configuration.

    Terminal window
    kubectl describe aerospikecluster AEROSPIKE_CLUSTER_NAME -n NAMESPACE

    Check the target namespace under Status > Aerospike Config > Namespaces and confirm that the namespace shows strong-consistency: true.

Strong consistency limitations

If there are any dead partitions, AKO stops with an error and user intervention is needed to recover those partitions. For more information on unavailable and dead partitions, see Validating partition availability.

  • SC mode can not be enabled or disabled on an already-deployed cluster.
  • All racks should have identical SC namespaces.
  • A cluster size smaller than the replication factor is allowed in AP mode but not in SC mode.
  • In-memory only namespaces cannot be configured with strong consistency on a Kubernetes deployment.
  • Batch scale-down is not supported for strong consistency clusters.
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?