Interview › Databases & Caching
What is connection pooling, and why does it matter for RDS (e.g., RDS Proxy)?
Databases & Caching · Basic level
Answer
Connection pooling reuses a bounded set of database connections and prevents unbounded clients from exhausting the database. RDS Proxy is a managed pooling proxy that helps with bursty traffic, Lambda concurrency, failover recovery, and credential rotation.
Technical explanation
Each DB connection consumes memory and CPU; in Kubernetes total connections equal pod count times pool size.
RDS Proxy multiplexes when session state allows it, but pinned sessions reduce benefits.
Prevention includes pool caps, backoff with jitter, timeouts, RDS Proxy/PgBouncer, and avoiding unbounded concurrency.
Hands-on example
Pool sizing example:
DB safe app budget = 850 connections
App pods = 50
Max pool per pod = floor(850/50) = 17
Choose 10 to 15 and load test.
PostgreSQL check:
SELECT usename, application_name, state, count(*) FROM pg_stat_activity GROUP BY 1,2,3 ORDER BY count(*) DESC;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 RDS Proxy, and what problem does it solve?
- How do you scale an RDS database vertically and what is the downtime impact?
- What are common causes of high RDS CPU, and how do you investigate?
- What is MVCC, and how does PostgreSQL implement it?
- What is Performance Insights, and what does it help you find?
- What is VACUUM in PostgreSQL, and why is autovacuum important?
- How do you monitor RDS performance (CloudWatch, Performance Insights, Enhanced Monitoring)?
- What is a blue-green deployment for RDS, and how does it reduce upgrade risk?