Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Multiple Availability Zones

How to deploy GridGain across multiple AWS availability zones using EKS auto scaling groups and an affinity backup filter.

To deploy GridGain in multiple availability zones, perform the steps below:

  1. Create an EKS cluster with auto scaling groups in different availability zones;

  2. Deploy the Cluster AutoScaler to work with given autoscaling groups when scheduling nodes;

  3. Define an affinity backup filter to place backup entries onto availability zones that differ from the primary entries.

Creating EKS Cluster and Deploying Cluster AutoScaler

To create an EKS cluster and to deploy Cluster AutoScaler, perform the steps below:

  1. Follow the EKS Cluster availability workshop to create an EKS cluster, then deploy the cluster autoscaler;

  2. Configure the autoscaler to use the autoscaling groups that you need.

              command:
                - ./cluster-autoscaler
                - --v=4
                - --stderrthreshold=info
                - --cloud-provider=aws
                - --skip-nodes-with-local-storage=false
                - --expander=least-waste
                - --nodes=1:3:autoScale-group-in-availability-region-a
                - --nodes=1:3:autoScale-group-in-availability-region-b

    At this point, the autoscaler is directed to create new nodes by using only 2 auto scaling groups. An example of a manual auto scaling group config could be found here.

  3. Adjust your auto scaling groups to have the appropriate capacity.

Configuring Backup Filters

Define an affinity backup filter to make sure that backup entries are stored in an availability zone that is different from that of your primary entry.

The following sections describe in detail how to set up a back up filter:

Defining LifeCycle Bean

The Lifecycle bean, which runs before the node is started, issues a REST request for the availability zone of the VM hosting the pod and stores the zone as a user attribute.

Refer to this section for more information.

Changing Configuration and Tuning the Backup Filters

This section describes how to change the config to call the lifecycle bean and configure the backup filters to use the availability zone attribute.

For more information, see the Class ClusterNodeAttributeAffinityBackupFilter section. Note the uses of cache templates in the example below:

Creating a Custom Image Containing the Lifecycle Bean

Deploying Using GridGain Operator

  1. Update the cluster configuration to include the config mentioned above;

  2. Change the cluster_image to the custom one;

  3. Deploy the operator using the custom credentials that are configured in steps 1 and 2.

Deploying GridGain Without the Operator

  1. Deploy GridGain per the AWS K8 deployment guide, using the custom image and config mentioned above.

  2. Scale the cluster: You should be able to see that the nodes are allocated only in the availability zones you specified.

As shown in the example below, all gridgain nodes are deployed either to 2b or 2c, but not to 2a:

Multiple Availability AWS Example

Verifying the Assigned Availability Zones (Optional)

  1. Log into one of the pods:

  2. Launch sql line:

  3. Get the AVAILABLITY_ZONE attribute values

    Availability Zone Attributes

This page is: Copyright © 2026 MariaDB. All rights reserved.

Last updated

Was this helpful?