Connection Pooling
The most common hidden ceiling, and the metric nobody collects.
4 to work through
-
beginner
Why does putting a connection pool in front of a database make a service faster when the database does exactly the same query work either way?
3 min answer -
intermediate
A service scales its application instances from 20 to 200 and the database begins refusing connections. What happened, and what is the correct architecture?
2 min answer -
intermediate
A service works fine at 10 instances. At 60 instances during a peak, the database starts refusing connections. Explain the arithmetic.
2 min answer -
advanced
A service under load has high latency and low CPU. The team increases the database connection pool and it gets worse. Why?
2 min answer
3 terms in this topic
Connection Pool Sizing
Choosing how many concurrent connections a service holds to a datastore, where both too many and too few cause outages.
conceptEfficient Concurrency Point
The concurrency level beyond which adding parallel work reduces total throughput, because contention costs more than the parallelism gains - and the …
practiceLittle's Law Applied to Pools
Using L = λW to size connection and thread pools from measured throughput and latency rather than from a default.
Neighbouring topics
Performance & Capacity
General material on performance and capacity engineering.
Latency
Distributions rather than averages, and the floors physics imposes.
Throughput
Work completed per unit time, and why it trades against latency.
Concurrency
Operations in flight, and the limits that are the real capacity ceiling.
Queueing Theory
Why latency explodes as utilisation approaches capacity.
Little's Law
L = λW, and the pool sizes it computes directly.
Bottleneck Analysis
Finding the constraint, and expecting a second one behind it.
Tail Latency
p99 behaviour, amplification across fan-out, and hedged requests.
Load Testing
Realistic data, realistic mix, and a ramp rather than a step.
Stress Testing
Pushing past target to learn what breaks first and how it fails.
Soak Testing
Long runs that surface leaks and slow degradation.
Capacity Modelling
Arithmetic before load tests, and headroom for failure as well as peak.
Horizontal vs Vertical Scaling
Scale out for stateless, scale up first for stateful.
Caching for Performance
Layer choice, hit ratio as a first-class metric, and cold-cache recovery.
Database Performance
Plans, indexes, contention and the pool in front of the database.
Network Performance Tuning
Keep-alive, compression, payload size and round-trip elimination.
Performance Budgets
Targets enforced in CI so regressions fail the build.
Profiling & Optimisation
Measuring before optimising, and optimising the dominant term.
Peak Event Readiness
Freeze, pre-scale, shed order, warm caches and rehearse.