-
Notifications
You must be signed in to change notification settings - Fork 10k
D1 REST API latency changelog #22751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
bf7ebb0
29f6104
791cf2e
07233c5
3481dc2
762444e
405af18
2ee3d42
c1b0234
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||
| --- | ||||||
| title: Faster D1 REST API | ||||||
| description: D1 REST API request latency improvements. | ||||||
| products: | ||||||
| - d1 | ||||||
| - workers | ||||||
| date: 2025-05-29T00:00:00Z | ||||||
| --- | ||||||
|
|
||||||
| Users using Cloudflare's [REST API](/api/resources/d1/) to query their D1 database can see lower end-to-end request latency now that D1 authentication is performed at the closest Cloudflare network data center that recieved the request. Previously, authentication required D1 REST API requests to proxy to Cloudflare's core centralized centers, which added network round trips. | ||||||
|
|
||||||
| D1 query endpoints like `/query` and `/raw` have the most noticeable improvements since they no longer access Cloudflare's core data centers. D1 control plane endpoints such as those to create and delete databases see smaller improvements, since they still require access to Cloudflare's core data centers for other control plane metadata. | ||||||
vy-ton marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| Performance improvements apply to only the REST API. Users can now expect similar performance querying their database via the REST API and via a [Worker](/d1/best-practices/query-d1/#query-d1-with-workers-binding-api). | ||||||
|
||||||
| Performance improvements apply to only the REST API. Users can now expect similar performance querying their database via the REST API and via a [Worker](/d1/best-practices/query-d1/#query-d1-with-workers-binding-api). | |
| These performance improvements only apply to the REST API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lambrospetrou Are there any plans to address the REST overhead? Is the overhead 10s of ms (if so I could still frame as comparable performance which is the goal)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's 100-300ms more than the Worker Binding depending on caching of downstream services, so not negligible in some cases. I don't want folks to start complaining that they don't see same numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's 100-300ms more than the Worker Binding depending on caching of downstream services
is this specific to D1 or general REST overhead for CF APi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not general CF API. Well, auth is, but the rest is for other things we check in D1 (e.g. entitlements, feature flags, and others) only during REST API requests. We can reduce that further later with some followups.
Uh oh!
There was an error while loading. Please reload this page.