Adjusting your mirrors: Finding and fixing blind spots in your configurations
summary
Kubernetes services with Postgres shards and an AWS RDS proxy show repeated latency spikes caused not by code but by defaults: pods create thousands of connections because the idle connection timeout is 10 seconds, traffic yields one transaction per connection every 12 seconds, so connections are repeatedly opened and closed. A metric named connection borrowing latency sits around 3 seconds; raising the idle timeout to 60 seconds collapses connection churn, drops borrowing latency and cuts request latency dramatically.
AI-written summary · about
