Interview › Databases & Caching
How do you size an ElastiCache cluster (memory, nodes, shards)?
Databases & Caching · Advanced level
Answer
I size ElastiCache from working-set memory, key/value overhead, fragmentation, CPU, network, connection count, replica needs, shard distribution, failover headroom, and growth forecast.
Technical explanation
Failover testing must measure the whole application recovery path, not just service events.
Connection storms are prevented with pool caps, rolling deploys, jittered startup, exponential backoff, and readiness gates.
For interview stories, state the business driver, migration plan, validation, rollback, and measurable result such as p95 latency, hit ratio, cost, or error-rate improvement.
Hands-on example
Capacity example:
Current RDS free storage = 500 GB
Growth = 20 GB/day
Days remaining = 25Action threshold = 45 days, so act now.
SQL size check:
SELECT relname, pg_size_pretty(pg_total_relation_size(oid)) FROM pg_class WHERE relkind = 'r' ORDER BY pg_total_relation_size(oid) DESC LIMIT 20;Plan: enable storage autoscaling with max cap, archive old data, review index bloat, test restore time, and evaluate partitioning.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Databases & Caching interview questions
- What is the blast radius of a cache outage, and how do you make the app degrade gracefully?
- How do you handle cache warming after a restart or failover?
- How do you test a Redis or database failover without impacting users?
- How do you decide what to cache and what not to cache?
- How would you use Redis for distributed locking, and what are the caveats?
- How would you use Redis for rate limiting?
- What is the difference between Redis as a cache and Redis as a primary datastore?
- Why are some Redis commands (KEYS, FLUSHALL) dangerous in production?