Menu
Amazon ElastiCache
User Guide (API Version 2015-02-02)

Actions You Can Take When a Node is Scheduled for Replacement

The following sections specify actions you can take when ElastiCache schedules one or more of your nodes for replacement.

Memcached

The following list identifies actions you can take when ElastiCache schedules one of your Memcached nodes for replacement.

  • Do nothing – If you do nothing, ElastiCache will replace the node as scheduled. When ElastiCache automatically replaces the node with a new node, the new node is initially empty.

  • Change your maintenance window – For scheduled maintenance events where you receive an email from ElastiCache, if you change your maintenance window before the scheduled replacement time, your node will now be replaced at the new time. The new maintenance time can be no earlier than the originally scheduled time, and no later than a week from the originally scheduled time.

    For example, suppose your scheduled maintenance is planned for Monday, July 4th and your maintenance window is set to Mondays, 04:00-05:00 UTC. If you now change the maintenance window to Monday, 08:00-09:00 UTC, your replacement will occur between 08:00-09:00 UTC on Monday, July 4th. If you change your maintenance window to Monday, 01:00-02:00 UTC, your replacement will occur between 01:00-02:00 UTC on Monday, July 11th i.e. the following week. For instructions, see Maintenance Window.

  • Manually replace the node – If you need to replace the node before the next maintenance window, manually replace the node.

    If you manually replace the node, keys will be redistributed which will cause cache misses.

    To manually replace a Memcached node

    1. Delete the node scheduled for replacement. For instructions, see Removing Nodes from a Cluster.

    2. Add a new node to the cluster. For instructions, see Adding Nodes to a Cluster.

    3. If you are not using Node Auto Discovery (Memcached) on this cluster, go to your application and replace every instance of the old node's endpoint with the new node's endpoint.

Redis

The following list identifies actions you can take when ElastiCache schedules one of your Redis nodes for replacement. To expedite finding the information you need for your situation, choose from the following menu.

Redis node replacement options

  • Do nothing – If you do nothing, ElastiCache will replace the node as scheduled.

    If the node is a member of a Redis (cluster mode disabled) cluster, the replacement node will sync with the primary node.

    If the node is standalone, ElastiCache will first launch a replacement node and then sync from the existing node. The existing node will not be available for service requests during this time. Once the sync is complete, the existing node is terminated and the new node takes its place. ElastiCache makes a best effort to retain your data during this operation.

  • Change your maintenance window – For scheduled maintenance events where you receive an email from ElastiCache, if you change your maintenance window before the scheduled replacement time, your node will now be replaced at the new time. The new maintenance time can be no earlier than the originally scheduled time, and no later than a week from the originally scheduled time.

    For example, suppose your scheduled maintenance is planned for Monday, July 4th and your maintenance window is set to Mondays, 04:00-05:00 UTC. If you now change the maintenance window to Monday, 08:00-09:00 UTC, your replacement will occur between 08:00-09:00 UTC on Monday, July 4th. If you change your maintenance window to Monday, 01:00-02:00 UTC, your replacement will occur between 01:00-02:00 UTC on Monday, July 11th i.e. the following week. For instructions, see Maintenance Window.

  • Replace a read-replica – If the node is a read-replica, replace the node.

    If your cluster has only 2 nodes and Multi-AZ is enabled, you must disable Multi-AZ before you can delete the replica. For instructions, see Modifying a Cluster with Replicas.

    To replace a read replica

    1. Delete the replica that is scheduled for replacement. For instructions, see Deleting a Cluster.

    2. Add a new replica to replace the one that is scheduled for replacement. If you use the same name as the replica you just deleted, you can skip step 3. For instructions, see Adding a Read Replica to a Redis Cluster.

    3. In your application, replace the old replica's endpoint with the new replica's endpoint.

    4. If you disabled Multi-AZ at the start, re-enable it now. For instructions, see Enabling Multi-AZ with Automatic Failover.

  • Replace the primary node – If the node is the primary node, promote a read-replica to primary, and then delete the former primary node.

    If your cluster has only two nodes and Multi-AZ is enabled, you must disable Multi-AZ before you can delete the replica in step 2. For instructions, see Modifying a Cluster with Replicas.

    To replace a primary node

    1. Promote a read-replica to primary. For instructions, see Promoting a Read-Replica to Primary.

    2. Delete the node that is scheduled for replacement (the old primary). For instructions, see Deleting a Cluster.

    3. Add a new replica to replace the one scheduled for replacement. If you use the same name as the node you just deleted, you can skip step 4.

      For instructions, see Adding a Read Replica to a Redis Cluster.

    4. In your application, replace the old node's endpoint with the new node's endpoint.

    5. If you disabled Multi-AZ at the start, re-enable it now. For instructions, see Enabling Multi-AZ with Automatic Failover.

  • Replace a standalone node – If the node does not have any read replicas, you have two options to replace it:

    Option 1: Replace the node using backup and restore

    1. Create a snapshot of the node. For instructions, see Taking Manual Backups.

    2. Create a new node seeding it from the snapshot. For instructions, see Restoring From a Backup with Cluster Resizing.

    3. Delete the node scheduled for replacement. For instructions, see Deleting a Cluster.

    4. In your application, replace the old node's endpoint with the new node's endpoint.

    Option 2: Replace the node using replication

    1. Add replication to the cluster with the node scheduled for replacement as the primary. Do not enable Multi-AZ on this cluster. For instructions, see To add replication to a Redis cluster with no shards.

    2. Add a read-replica to the cluster. For instructions, see To add nodes to a Memcached or Redis (cluster mode disabled) cluster with one shard (console).

    3. Promote the newly created read-replica to primary. For instructions, see Promoting a Read-Replica to Primary.

    4. Delete the node scheduled for replacement. For instructions, see Deleting a Cluster.

    5. In your application, replace the old node's endpoint with the new node's endpoint.

On this page: