Bobcares

AWS redis cache replication

by | Jan 26, 2023

Wondering how to perform aws redis cache replication? Our AWS Support team is here to lend a hand with your queries and issues.

AWS redis cache replication

Today, let us see the steps followed by support techs for AWS redis cache replication

Redis implements replication in two ways:

  • With a single shard that contains all of the cluster’s data in each node—Redis
  • With data partitioned across up to 500 shards—Redis

Each shard in a replication group has a single read/write primary node and up to 5 read-only replica nodes.

You can create a cluster with higher number of shards and lower number of replicas totaling up to 90 nodes per cluster.

This cluster configuration can range from 90 shards and 0 replicas to 15 shards and 5 replicas, which is the maximum number of replicas allow.

The node or shard limit can increase to a maximum of 500 per cluster if the Redis engine version is 5.0.6 or higher.

Redis (Cluster Mode Disabled)

A Redis cluster has a single shard, inside of which is a collection of Redis nodes; one primary read/write node and up to five secondary, read-only replica nodes.

Then, each read replica maintains a copy of the data from the cluster’s primary node.

Next, asynchronous replication mechanisms are use to keep the read replicas synchronized with the primary.

Applications can read from any node in the cluster.

Applications can write only to the primary node. Read replicas improve read throughput and guard against data loss in cases of a node failure.

Redis cluster with a single shard and replica nodes

Also, you can use Redis  clusters with replica nodes to scale your Redis solution.

All of the nodes in a Redis cluster must reside in the same region.

Next, when you add a read replica to a cluster, all of the data from the primary is copied to the new node.

From that point on, whenever data is written to the primary, the changes are asynchronously propagate to all the read replicas.

Next, to improve fault tolerance and reduce write downtime, enable Multi-AZ with Automatic Failover for your Redis cluster with replicas.

Then, you can change the roles of the nodes within the Redis cluster, with the primary and one of the replicas exchanging roles.

Finally, you might decide to do this for performance tuning reasons.

Redis (cluster mode enabled)

A Redis (cluster mode enabled) cluster is comprise of from 1 to 500 shards (API/CLI: node groups).

Each shard has a primary node and up to five read-only replica nodes.

The configuration can range from 90 shards and 0 replicas to 15 shards and 5 replicas, which is the maximum number of replicas allow.

The node or shard limit can be increased to a maximum of 500 per cluster if the Redis engine version is 5.0.6 or higher.

For versions below 5.0.6, the limit is 250 per cluster.

To request a limit increase, see AWS Service Limits and choose the limit type Nodes per cluster per instance type.

Each read replica in a shard maintains a copy of the data from the shard’s primary.

Redis (cluster mode enabled) cluster with multiple shards and replica nodes

All of the nodes in a Redis (cluster mode enabled) cluster must reside in the same region.

To improve fault tolerance, you can provision both primaries and read replicas in multiple Availability Zones within that region.

Currently, in Redis, there are some limitations.

  • You cannot manually promote any of the replica nodes to primary.
  • You can only change the structure of a cluster, the node type, and the number of nodes by restoring from a backup

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

In conclusion, our Support Engineers demonstrated how to AWS redis cache replication. Furthermore, we went through different causes and solutions for this specific error.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.