Is it possible to dynamically use D1 databases

The documentation on D1 limits [1] says "Each D1 database can store up to 10 GB of data, and you can create up to thousands of separate D1 databases. This allows you to split a single monolithic database into multiple, smaller databases, thereby isolating application data by user, customer, or tenant."

Is it possible to dynamically create and connect to D1 databases from a worker. E.g. A customer signs up, I create a database for them, I then read/write to/from that database.

A post on the Cloudflare forums [2] around a year ago said "The team is working on dynamic binding, but not available yet.". Is it possible now?

[1] https://developers.cloudflare.com/d1/platform/limits/
[2] https://community.cloudflare.com/t/using-d1-instances-dynamically/661841
Was this page helpful?