AWS SysOps Exam: Scaling Redis
Redis Scaling Overview
Redis, a popular in-memory data structure store, offers two modes for scaling:
-
Cluster Mode Disabled
- It consists of a single-node group with one primary node and up to five replica nodes.
- Horizontal Scaling: Add or remove read replicas to adjust capacity.
- Vertical Scaling: Change to larger or smaller node types, involving data replication to a new node group and a DNS update for transparent application transition.

Vertical Scaling
-
Cluster Mode Enabled
- More complex scaling options, including online scaling (no downtime but potential performance degradation) and offline scaling (cluster offline for scaling).
- Horizontal Scaling: Achieved through resharding (adding/removing shards) and shard rebalancing.
- Vertical Scaling: Change node types for read/write capacity adjustment, supports online scaling.
Key Redis Metrics to Monitor
Monitoring specific metrics is crucial for maintaining Redis performance:
- Evictions: Indicates non-expired items were removed for new writes. Solutions include choosing an eviction policy or scaling up/out.
- CPU Utilization: High CPU usage suggests needing larger node types or more nodes.
- Swap Usage: Should not exceed 50MB; otherwise, review memory settings.
- Current Connections: High numbers may indicate application issues.
- Database Memory Usage Percentage: Reflects memory utilization.
- Network In/Out: Monitors data transfer rates.
- Replication Bytes/Lag: Measures data replication efficiency, aiming for high bytes and low lag.
Conclusion
Understanding how to scale Redis effectively, whether through horizontal or vertical methods, and monitoring key performance metrics are essential components for the AWS SysOps exam. This knowledge ensures the optimal performance and scalability of Redis deployments in AWS environments.
Evictions in Amazon ElastiCache refer to the process where the cache service forcibly removes items from the cache before their natural expiration. This typically occurs in a cache environment when the memory allocated for the cache is fully utilized, and new items need to be added, forcing the cache to evict existing items to make space for the new ones.