Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/).

3 changes: 1 addition & 2 deletions src/content/partials/workers/storage-products-table.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
{}

---

| Use-case | Product | Ideal for |
Expand All @@ -12,4 +11,4 @@
| Global co-ordination | [Durable Objects](/durable-objects/) | Building collaborative applications; global co-ordination across clients; strongly consistent, transactional storage. |
| Vector search (database) | [Vectorize](/vectorize/) | Storing [embeddings](/workers-ai/models/#text-embeddings) from AI models for semantic search and classification tasks. |
| Task processing & batching | [Queues](/queues/) | Background job processing (emails, notifications, APIs) and log processing/batching. |
| Connect to an existing database | [Hyperdrive](/hyperdrive/) | Connecting to an existing database in a cloud or on-prem. |
| Connect to an existing database | [Hyperdrive](/hyperdrive/) | Connecting to an existing database in a cloud or on-premise. |
Loading