#10938·tldraw

Let connect-path Postgres queries run concurrently with the room boot

Author: MitjaBezensekCreated Sep 25, 2026Updated Sep 25, 2026
Labelsperformancedotcom

️: create an issue for this second one. mention that hyperdrive should merge first


When a file room boots cold, its Postgres queries run one at a time per durable object, and each opens a new connection. So the connect path's file record and role lookups queue behind the boot's comments load, or the other way round. In the slowest prod boots from the last 6h, the role check finished 0.4-1s after the comments load, and cold-DO connections took 1.0-1.7s each. This shows up as the 1-4s spikes on the "Create-from-source & load stage latency" panel (db_load_comments p50 215ms, p90 1.8s, p99 3.0s over 24h). Goal: let the connect path's queries run alongside the boot instead of queueing behind it, likely by allowing a few concurrent checkouts per durable object.

This is blocked on #10912 (sync worker Postgres through Hyperdrive) being live in production. Today every parallel checkout would be one more connection through PgBouncer, which already hits its pool cap. With Hyperdrive, connections end at a nearby Cloudflare pool, so parallel checkouts become cheap. After Hyperdrive ships, re-measure db_load_comments and on_request_group_check. Only do this work if the connect path's queries still visibly queue behind the boot. If the spikes are gone, close this issue.

Open questions

  1. Should this go ahead only if the queueing still shows up after Hyperdrive, or regardless? Only if it's still a problem after Hyperdrive.
  2. Is there a latency target for cold room opens that would make this done? No fixed target.

Confidence: 85%, ready to get started once Hyperdrive is live and re-measured.