The Connection Pool Default That Locked Up OpenAI's Pods
The same post-mortem explains why a two-engineer Rust rewrite worked: the shape of the API contract, not the coding agent.
Why nobody audits this
LIFO reuse is a defensible default. Handing back the most recently released connection keeps the pool small and lets cold connections age out on the idle timeout. That is why it survives code review for years without anyone reading it closely. The pathology only appears when a subset of upstreams degrades while the pool has no health signal and no in-flight request count, which is the state an incident puts you in.
So the audit is wider than one library. Go's http.Transport selects from its idle-connection set. Homegrown async pools backed by a stack behave identically. Connection-per-replica setups hiding behind a single DNS name inherit the same shape. Green dashboards under normal load are not evidence of anything here. The test that proves the fix is a chaos run with one artificially slowed replica: traffic should shed away from it. If it concentrates, you have found your version of the bug in staging.
70M requests per second
OpenAI's write-up describes a service handling 70M requests per second over 500PB across roughly 40 regions for more than a billion weekly users, after three consecutive years of 10x growth. It started in 2023 as a small Python library on a single Cosmos DB instance and is now the second-largest service at OpenAI by core count. That last fact matters most for your own cost model: at consumer scale, compounding spend lives in serving and storage infrastructure, not training.
The Rust rewrite, read honestly
Two engineers using Codex and GPT-5.5 rewrote the service in Rust during Q2 2026. It now serves 95% of production at 6x CPU efficiency and 15x memory efficiency. Both numbers are roughly what a naive-async-Python-to-Rust port should produce. The CPU win is interpreter and per-request allocation overhead disappearing. The memory win is per-object header overhead plus coroutine frames. The port was tractable because this service deliberately exposed a non-expressive API, so the behavioral contract was small enough to specify, diff, and shadow-test against live traffic.
SRE Weekly's coverage of Checkly's Node-to-Go rewrite is the useful counterweight. That team worked test-first with agents and still hit trouble, because a test suite encodes only the behavior you already understood, and an agent that ports the tests inherits your misreadings. Node to Go is a semantics minefield: JSON number precision (float64 versus int64), error semantics (unhandled rejection versus panic), HTTP client default timeouts, and a move from a single-threaded event loop to goroutines that makes data races newly possible in code that was previously race-free by construction. Both accounts point at the same gate: differential shadow replay against production traffic, old service and new service diffed on live requests.
Constrained surfaces as a reliability primitive
OpenAI exposed a NoSQL API because cheap-to-write SQL that was expensive to run kept taking out their Postgres. One JOIN without a supporting index, written in ten seconds by someone on another team, is an incident. A narrow enumerated API is boring, pushes joins into the application layer, and never pages anyone. It also made the rewrite tractable, so the same property buys reliability today and rewritability later. The residual risk they now carry: the 5% still running Python is permanent dual-stack divergence, not a rounding error.
Slow one replica by hand. Either traffic sheds away from it, or the pool keeps handing you the slowest server.
What to do
Grep every Python service for aiohttp.TCPConnector this week, switch it to FIFO reuse, and load-test against one deliberately degraded upstream replica to confirm traffic sheds away from it.
Extend the same audit to Go http.Transport idle-connection reuse and any homegrown pool backed by a stack before your next capacity test.
Inventory which internal consumers can issue arbitrary SQL against shared Postgres and put statement timeouts or plan-cost rejection in front of them this quarter.