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 = 25

Action 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.

Preparing for an interview?

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

← All Databases & Caching questions