Cloudflare Workers tip: loop cron work back near your DB, p90 queries drop 75%
DanielLockyer · x · 2026-10-04
Engineer @dylanga shared a Cloudflare Workers optimization: with region placement, cron and queue triggers run wherever there's excess compute at execution time — often SEA during US business hours — sending database requests on multiple round-the-globe trips and holding connections far longer than necessary.
The fix: have the agent make an internal loop back so the actual work executes closer to the database. After the change, p90 query latency dropped by 75%. A directly actionable architecture detail for developers running database-heavy workloads on Cloudflare.
More from coding & agent
- Letting Claude prompt Midjourney: machines telling machines how to make pictures — technollama · 2026-10-04
- Why Agents Don't Need GUIs: Shell, Pipes and Zellij Beat Any App — Liu_eroteme · 2026-10-04
- MCP Guardrails: Gate Tool Calls at the Method Layer With Agentgateway's ExtMCP — bibryam · 2026-10-04
- Scoble's vacation AI agent reads X's AI community and declares 'The Harness Is the Product Now' — Scobleizer · 2026-10-04
- Sandboxing AI agents with bubblewrap and tmpfs so they can't touch your secrets — Liu_eroteme · 2026-10-04
- Instinct and Muse become the first AI agents a daily user actually relies on — nateliason · 2026-10-04