D1: open beta is here
D1 is a serverless SQL database built for Cloudflare Workers that allows you to deploy databases quickly with no configuration needed. It provides automatic horizontal scaling, supports over 100,000+ databases for platform users without any limits or charges per database, and has free global read replication in the works. D1 is now generally available for use by everyone, including developers building on Workers and platforms looking to deploy a dedicated D1 database per customer. The pricing model for D1 changed as of October 20th, with costs based solely on reads, writes, and storage. The free tier includes up to 25 billion queries per month, while the $5/month worker plan allows users to run their most expensive query 59 million times before incurring additional costs. D1 returns row counts for each query via its HTTP API, allowing developers to understand how many rows a query reads or writes and optimize their queries with indexes accordingly. This feature is also available through the Cloudflare dashboard and GraphQL analytics API. For platform users on Workers, D1 supports creating more databases programmatically using the D1 HTTP API without redeploying workers. There are no limits or charges for idle databases, and per-database analytics are provided via the GraphQL analytics API to help understand usage patterns across all databases. RONIN is one of the early adopters of D1 for Platforms, deploying a dedicated database per customer for isolating data closer to users and providing strong separation from other customers' queries. D1 aims to reach general availability (GA) for production use-cases by early next year (Q1 2024), with plans to expand Time Travel capabilities and increase limits on per-database storage and the number of databases that can be created in the meantime. Developers can get started using D1
Company
Cloudflare
Date published
Sept. 28, 2023
Author(s)
Matt Silverlock, Ben Yule
Word count
2191
Hacker News points
None found.
Language
English