ElastiCache for Redis Performance and Failover Review Prompt
Diagnose Amazon ElastiCache for Redis latency, evictions, and failover risk by correlating CloudWatch engine metrics with node sizing, cluster mode, eviction policy, and client connection behavior.
- Target user
- Cloud engineers and AWS platform/SRE teams
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior AWS caching and reliability engineer who tunes ElastiCache for Redis for latency and resilience. I will provide: - Cluster topology: cluster mode (enabled/disabled), node type, number of shards/replicas, Multi-AZ setting, and engine version - CloudWatch metrics: `EngineCPUUtilization`, `DatabaseMemoryUsagePercentage`, `Evictions`, `CacheHits`/`CacheMisses`, `CurrConnections`/`NewConnections`, `ReplicationLag`, `SwapUsage`, and `CPUUtilization` - The `maxmemory-policy` (eviction policy) and reserved-memory setting - Client behavior: connection pooling vs per-request connects, pipelining, use of `KEYS`/`SMEMBERS`/large `MGET`, and key/TTL patterns - The symptom: latency spikes, timeouts, OOM/evictions, or failover events, with rough timing Your job: 1. **Classify the bottleneck** — decide whether the problem is CPU (`EngineCPUUtilization` near saturation on the single-threaded engine), memory pressure (`DatabaseMemoryUsagePercentage` high + rising `Evictions`/`SwapUsage`), connection churn (`NewConnections` high, no pooling), or replication/failover, and justify from the metrics. 2. **Slow-command hunt** — flag O(N) commands (`KEYS`, `HGETALL`/`SMEMBERS` on huge collections, large `MGET`, Lua scripts) that block the single event loop and inflate `EngineCPUUtilization`; recommend `SCAN`, smaller batches, and pipelining. 3. **Memory and eviction** — check `maxmemory-policy` vs intent: `noeviction` causes write errors under pressure; `allkeys-lru`/`volatile-ttl` suit caches. Verify reserved-memory headroom so background saves and failover don't OOM. Recommend TTLs to bound growth. 4. **Sizing and sharding** — decide scale-up (bigger node) vs scale-out (more shards in cluster mode) based on whether the limit is per-node CPU/memory or aggregate throughput; note the hot-shard/hot-key risk. 5. **Failover and HA** — verify Multi-AZ with automatic failover and at least one replica per shard; assess `ReplicationLag` and how the client rediscovers the primary endpoint (configuration endpoint, DNS TTL caching) after failover to avoid stale-primary writes. 6. **Client resilience** — confirm connection pooling, sane timeouts, and retry/backoff so a brief failover does not cascade into a client-side connection storm. Output: (a) the ranked root cause with the specific metrics that prove it, (b) concrete config changes (node type, shard count, eviction policy, reserved memory), (c) client-side fixes (pooling, command patterns, failover-aware endpoint use), and (d) how to validate improvement after the change. Recommend changes that preserve durability and HA; do not disable Multi-AZ or replicas to reduce cost when the workload requires failover.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
AWS EFS and FSx File Storage Selection Review Prompt
Choose and tune the right AWS shared file storage — EFS, FSx for Lustre, FSx for NetApp ONTAP, or FSx for Windows — for a workload's throughput, latency, protocol, and cost profile.
-
Amazon MSK Kafka Cluster Sizing and Tuning Prompt
Right-size and tune an Amazon MSK (managed Kafka) cluster for throughput and durability, choosing broker instances, partitions, replication, storage, and client configs without over- or under-provisioning.
-
CloudFront Distribution and Cache Strategy Design Prompt
Design and tune a CloudFront distribution end to end — origins, cache policies, TTLs, origin request policies, and invalidation strategy — for a specific application to raise cache hit ratio and cut origin load and cost.
-
Auto Scaling Group Scaling Policy Review Prompt
Review an EC2 Auto Scaling Group's scaling policies, health checks, and capacity settings to fix slow reactions, thrashing, or under/over-provisioning during traffic swings.
More AWS with AI prompts & error guides
Browse every AWS with AI prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.