Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AWS with AI Difficulty: Advanced ClaudeChatGPTCursor

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

More AWS with AI prompts & error guides

Browse every AWS with AI prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.