A talk transcript covering database connection pool sizing from first principles. Explains why opening connections is expensive (7-8 network round trips, 5ms to 1.5s depending on network distance), how connection pools work, and how to size them correctly. Applies Little's Law to calculate minimum required connections (throughput × average query time) and Kingman's Law to explain why utilization above 75-80% causes exponential wait time increases. Provides a formula for maximum pool size: (CPU cores × 2) + spindle count. Includes a real-world banking system case study showing 640 configured connections vs. the ~200 actually needed. Also covers application-side vs. database-side pools (e.g., PgBouncer), context switching overhead from oversized pools, and separating short vs. long-running workloads into different pools.

38m watch time

Sort: