Configure Cassandra for production Stay organized with collections Save and categorize content based on your preferences.
This topic describes steps you must take to configure the Cassandra database component for an Apigee hybrid production installation.
Ensure high availability
Cassandra clusters need three availability zones to maintain availability in a production environment. If one zone goes down, the remaining zones will continue responding to requests while the remaining zone comes back online. If two or more zones go down, Cassandra will be unable to respond to requests until at least two zones come back online. Apigee recommends bringing zones back online within three hours to minimize the risk of missing data updates.
Apply Cassandra storage settings
To apply changes to the Cassandra storage settings in your overrides file, execute the following commands:
$APIGEECTL_HOME/apigeectl init -f overrides/OVERRIDES_FILE
$APIGEECTL_HOME/apigeectl apply -f overrides/OVERRIDES_FILE
Configure Cassandra storage settings
For a production installation of Apigee hybrid, Google recommends that you add the following storage and heap settings to your overrides file and apply them to the cluster:
Note:All Cassandra storage settings in the overrides file are per pod.See alsoScaling Cassandra.cassandra: ... replicaCount: 3 storage: storageclass:your-preferred-ssd-storage #If not using default storage for your cluster capacity: 500Gi resources: requests: cpu: 7 memory: 15Gi maxHeapSize: 8192M heapNewSize: 1200M
replicaCount
The value ofreplicaCount must be a multiple of3. To determine your desiredreplicaCount value, consider the following:
- Estimate the traffic demands for your proxies.
- Load test and make reasonable predictions of your CPU utilization.
- You can specify different
replicaCountvalues in different regions. - You can expand the
replicaCountin the future in your overrides file.
To check the currentreplicaCount setting, execute the following command on your cluster:
kubectl get sts -nNAMESPACE apigee-cassandra-default -o=jsonpath='{.spec.replicas}'storageclass
Note: Once you have created your cluster and set the StorageClass, you cannot change the StorageClass.For production, Cassandra storage must be an SSD StorageClass. Set the value ofstorageclass if you are not using the default Kubernetes StorageClass for your cluster. You can check the default StorageClass with the following command.
kubectl get storageclass
Your output should look something like:
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGEpremium-rwo pd.csi.storage.gke.io Delete WaitForFirstConsumer true 6d23hstandard kubernetes.io/gce-pd Delete Immediate true 6d23hstandard-rwo(default) pd.csi.storage.gke.io Delete WaitForFirstConsumer true 6d23h
Follow the instructions inStorageClass configuration if you want to change the default Kubernetes StorageClass.
To check the currentstorageclass setting, execute the following command on your cluster:
kubectl get pvc -nNAMESPACE cassandra-data-apigee-cassandra-default-0 -o=jsonpath='{.metadata.annotations.volume\.beta\.kubernetes\.io/storage-class}'capacity
For production installations, Google recommends a storage capacity of at least 500Gi (gibibytes). You can change the storage capacity in response to your cluster's storage needs. See the instructions inExpand Cassandra persistent volumes to change the storage capacity.
The default forcassandra.storage.capacity is10Gi, which is insufficient for production installations. Seecassandra.storage.capacity in the Configuration property reference.To check the current capacity setting, execute the following command on your cluster:
kubectl get pvc -nNAMESPACE cassandra-data-apigee-cassandra-default-0 -o=jsonpath='{.spec.resources.requests.storage}'cpu andmemory
For production installations, Google recommends at least 7 CPUs and a minimum 15Gi (gibibytes) per pod. When specifyingcassandra.resources.requests.cpu andcassandra.resources.requests.memory, consider the traffic volume and the CPU and Memory demands of your proxies.
To check the current cpu setting, execute the following command on your cluster:
kubectl get pods -nNAMESPACE apigee-cassandra-default-0 -o=jsonpath='{.spec.containers[].resources.requests.cpu}'To check the current memory setting, execute the following command on your cluster:
kubectl get pods -nNAMESPACE apigee-cassandra-default-0 -o=jsonpath='{.spec.containers[].resources.requests.memory}'maxHeapSize andheapNewSize
These properties determine the maximum memory heap allocated to cassandra processes and the amount by which memory is increased, respectively, in megabytes (heap sizes are specified in megabytes, not mebibytes). For production environments, Google recommends the following values:
maxHeapSize: 8192MheapNewSize: 1200M
Consult your Kubernetes platform provider's documentation for optimal heap size values.
To check the currentmaxHeapSize setting, execute the following command on your cluster:
kubectl get sts -nNAMESPACE apigee-cassandra-default -o=jsonpath='{.spec.template.spec.containers[].env[?(@.name=="MAX_HEAP_SIZE")]}' To check the currentheapNewSize setting, execute the following command on your cluster:
kubectl get sts -nNAMESPACE apigee-cassandra-default -o=jsonpath='{.spec.template.spec.containers[].env[?(@.name=="HEAP_NEWSIZE")]}'For more information on these property settings, see the Configuration property reference.
Use SSD storage for production deployments
For the Cassandra database, the hybrid runtime only supports using dynamically created persistent volumes to store data. Local solid state disk (SSD) drives are not supported.
If you do not currently have SSD configured for Cassandra, you must configure aStorageClass definition that is backed by a solid-state drive (SSD) and make it the default class. SeeStorageClass configuration for detailed steps.
Follow the instructions inStorageClass configuration if you want to change the default Kubernetes StorageClass.
Note: The Cassandra database for hybrid should not use persistent volumes provisioned on network-attached storage (NAS) systems.Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.