System Design
16. Performance EngineeringAnimated
Connection Pool Optimisation
Sizing and tuning pools.
The idea
Right-sized pools keep databases busy without overloading them.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Opening a database connection is slow.
- step:
- 1/4
- at:
- Connection pool
1/11
The green dot is a request moving through the system.
Step by step
- 1Measure concurrent queries
- 2Set min and max sizes
- 3Add timeouts and validation
- 4Monitor wait time
Where it is used
Database access.
Watch out for
Too large a pool hurts the database.