Public service announcement: if you're seeing very slow Cloudflare D1 query latencies, you're not alone.
I just burned hours trying to figure out why basic D1 SQL queries against a 100MB database are taking 20-30 seconds wall time. Turns out there's an ongoing D1 issue, but it's only being acknowledged in Cloudflare's D1 Discord channel, while cloudflarestatus.com says everything is a-ok.
Posting here in case it saves someone else the debugging rabbit hole.
So after having used GCP, AWS, and all the orchestration baggage that came with it, developing and testing user-facing apps with Miniflare, workerd, D1, and wrangler has been a breeze... until I discovered some of my D1 calls take 20 seconds to resolve on a table with 10 rows. Query takes sub-millisecond.
Status page looking good, all systems operational. Digging through issues, pulling my hair out. Then stumbled upon this post to discover there is indeed an issue, and it is acknowledged on Discord... Discord? Why?
Honestly, I've been the fool here. Discouraged every single soul I know from vendor lock-in, only to vendor lock-in myself because I really liked the product.
Cloudflare is in a great position to dominate the ecosystem. They understand our needs. However, feature creep, half-baked releases, and improper communication don't give me the confidence to continue using their services at scale.
Incident is marked as resolved... tracing outliers tell a different story. Guess it's time to move on. Can't claim you offer a reliable database at scale if a trivial lookup on a 10-row table resolves in 20 seconds.