Interview › Databases & Caching
How do you handle connection storms against the cache after a deploy?
Databases & Caching · Advanced level
Answer
Connection storms happen when many clients reconnect simultaneously after deploy, failover, scaling, or network issues. I prevent them with pool caps, rolling deploys, jittered startup, exponential backoff, and readiness gates.
Technical explanation
Pods, functions, or clients can all reconnect at once and exceed DB/cache limits.
Backoff with jitter and pool caps prevent synchronized retries.
Rolling deploy settings and readiness probes must not hammer dependencies.
Hands-on example
Kubernetes guardrails:
maxSurge: 10%
maxUnavailable: 0
DB_POOL_MAX=10
REDIS_POOL_MAX=20
CONNECT_BACKOFF_JITTER=trueAdd random startup sleep before opening warm connections.
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
- How do you test a Redis or database failover without impacting users?
- 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 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?