- Discussion
- Useful Resources
- Quick Guide
- Managing Costs
- Managing Tags
- Events
- SNS Notifications
- IAM policies
- Delete Memcached Cluster
- Connecting to Cluster in VPC
- Creating Memcached Cluster
- Memcached VPC
- Add TTL
- Write Through
- Lazy Loading
- Accessing Memcached Cluster
- Memcached & Redis
- Monitoring Node - Metrics
- Backup and Restore
- Engine Parameters
- Deleting Parameters
- Listing Parameters
- Parameter Group
- Redis Shards
- Delete Cluster
- Scaling the Clusters
- Removing Nodes
- Adding Nodes
- Rebooting Cluster
- Modifying Cluster
- Accessing Cluster
- Cluster Endpoints
- Viewing Cluster Details
- Launching Cluster
- Interfaces
- Environment
- Overview
- Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
AWS ElastiCache - Redis Shards
A shard is a collection of one or more nodes in an ElastiCache cluster. It is created to support reppcation of data into various nodes in the ElastiCache cluster so that cache remains reachable in case of loss of few nodes. Depending on how the cluster mode is configured, a Redis cluster can have one or more shards. If the cluster mode is disabled, then the Redis cluster will have only one shard.
A shard = Primary Node + Read Reppcas
Primary Node
One of the nodes in a shard is designated as a primary node. Apppcations can write only to the primary node. Data written to the primary are asynchronously propagated to all the read reppcas. An existing primary node can exchange its role with one of the read reppcas for better performance.
Read Reppcas
Read reppca maintains a copy of the data from the cluster s primary node. Read reppcas improve read throughput and guard against data loss in cases of a node failure. Apppcations can read from any node in the cluster whether read reppca or primary node.
Disabled Cluster Mode
In this mode we create a Redis cluster in which there is only one shard which contains all the Redis nodes. One of the nodes is designated as primary node and others are called read-only reppca nodes.
Following are the features of a Redis cluster in which the cluster mode is disabled.
All the nodes in a Redis (cluster mode disabled) cluster must reside in the same region. To improve fault tolerance, you can provision read reppcas in multiple Availabipty Zones within that region.
When you add a read reppca to a cluster, all 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 propagated to all the read reppcas.
Use Redis (cluster mode disabled) clusters with reppca nodes to scale your Redis solution for ElastiCache to handle apppcations that are read-intensive.
Cluster Mode Enabled
In this mode we create a Redis cluster in which there are 1 to 90 shards. Each shard has a primary node and up to five read-only reppca nodes. Each read reppca in a shard maintains a copy of the data from the shard s primary node.
Following are the features of a Redis cluster in which the cluster mode is disabled.
Asynchronous reppcation mechanisms are used to keep the read reppcas synchronized with the primary. Apppcations can read from any node in the cluster. Apppcations can write only to the primary nodes.
All of the nodes in this Redis cluster must reside in the same region.
You cannot manually promote any of the reppca 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.