hard20 pts · first answer countsdatabasesscalabilityperformance
Connection pools and autoscaling
Each API instance has a PostgreSQL pool of 50 connections. During a traffic spike, autoscaling grows from 4 to 40 instances, and the database starts failing with too many connections and high latency. What is the best fix?