> ive seen other people having the same issue on the forum aswell but there seems to be no responses

ive seen other people having the same issue on the forum aswell but there seems to be no responses
It's mentioned many times in the group actually why that is.

The REST API is not how you are meant to be using D1 at the moment as part of your production applications. To get the best performance, you should use the Workers binding and access D1 through your worker. The REST API goes through a centralized location and has different layers adding latency, more aggressive rate limiting, and is therefore not suitable to be used in your actual application to access D1 in a hot path.

There has been recent improvements in the D1 latencies when using the Worker binding and you get pretty much a roundtrip's worth of latency: https://developers.cloudflare.com/d1/platform/changelog/#2025-01-07
Cloudflare Docs
Subscribe to RSS
Was this page helpful?