Connection pooling strategies in Amazon Aurora DSQL
Database Blog
This article presents four connection pooling strategies for Amazon Aurora DSQL to reduce overhead, stay within rate limits, and avoid reconnection storms.
- Use official AWS connectors (HikariCP, psycopg, node-postgres, pgxpool) that handle IAM token lifecycle automatically
- Configure maximum connection lifetime with jitter to spread recycling over time and prevent thundering herd reconnections
- Size pools conservatively (10-20 connections per instance) and monitor DPU consumption to balance throughput and latency
- For Lambda, instantiate pools at module scope outside handlers to persist across warm invocations
- In multi-Region deployments, create separate pools per Region since cross-Region latency occurs only at commit time
- Instrument client-side metrics like pool acquire latency, active connections, and exhaustion events to detect bottlenecks
- Avoid database-side proxies like PgBouncer since Aurora DSQL handles transaction-level multiplexing natively
Following these strategies enables applications to leverage Aurora DSQL's automatic scaling and high availability while maintaining minimal connection overhead and predictable latency.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.