Skip to content

Commit

Permalink
Add D1 vs Hyperdrive
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgauvin authored Oct 10, 2024
1 parent c12507e commit 9e1cd8b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/content/docs/workers/platform/storage-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,15 @@ The new beta version of Durable Objects is available where each Durable Object h

:::

## D1 vs Hyperdrive

D1 is a standalone, serverless database that provides a SQL API to store and access your relational data.

Hyperdrive is a service that improves the performance of your existing, regional PostgreSQL databases, optimizing them for global data access from Workers.

If you are building a new project on Workers or are considering migrating your data, use D1.

If you are building a Workers project with an existing PostgreSQL database, use Hyperdrive.

D1 does not need to be used with Hyperdrive because it does not have slow connection setups which would benefit from Hyperdrive's connection pooling. D1 data can also be cached within Workers using the [Cache API](/workers/runtime-apis/cache/).

0 comments on commit 9e1cd8b

Please sign in to comment.