Skip to content
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

Cloudflare D1 10gb size limit #232

Open
birdlavv opened this issue Aug 18, 2024 · 7 comments
Open

Cloudflare D1 10gb size limit #232

birdlavv opened this issue Aug 18, 2024 · 7 comments
Labels
question Further information is requested

Comments

@birdlavv
Copy link

The strict database size cap of 10gb for Cloudflare D1 is quite limiting for large projects.

Drizzle currently supports many database drivers, some of which are edge-friendly.
Perhaps something like a Planetscale integration would be useful for larger projects to get around these limits.

Being able to use the NuxtHub's tasty tooling with other relational data sources would be a big DX win.

Additional context
Cloudflare D1 limits documentation
Rumors that the size cap will probably remain

@atinux atinux added the question Further information is requested label Aug 19, 2024
@atinux
Copy link
Contributor

atinux commented Aug 19, 2024

Hey @birdlavv

What other database are you thinking about to use instead of D1?
I will also ask the Cloudflare team about those limits.

@birdlavv
Copy link
Author

Thanks for looking into it, @atinux!
Currently, we are using Planetscale until D1 can scale to a larger size.

@atinux
Copy link
Contributor

atinux commented Aug 19, 2024

Then I guess the solution might be #208

@birdlavv
Copy link
Author

Being able to use any relational DB (via #208) in the Drizzle UI in the NuxtHub dashboard would be 🔥

According to the Hyperdrive docs, MySQL support (Planetscale/Vitess) is not yet available. There does seem to be some movement on the Planetscale end.

D1 with a bigger size cap would be ideal due to the incredible Cloudflare pricing.

@miguelrk
Copy link

miguelrk commented Aug 19, 2024

I didn't know of the 10GB Cloudflare limitation! This is a serious limitation for real world production apps...

Turso is a think a closer alternative to D1. I've used it before and its very good, ultra nice DX.

If Cloudflare is reluctant to increase that 10GB limit, I'm afraid making NuxtHub database agnostic is very important, maybe unjs/d0 can help in this regard?

@atinux
Copy link
Contributor

atinux commented Aug 19, 2024

It is also related to #15 as one solution would be to directly offer the UI on top of useDatabase() directly and know if we need to spawn a D1 database, a hyperdrive connector, or if you use an external provider like Turso (you will have to create the resource manually until we support an automation)

It is also related to #179 to know about the bindings to create.

PS: the NuxtHub database today (which is using D1) with already thousands of projects & users is <10 MB

@miguelrk
Copy link

miguelrk commented Aug 20, 2024

TLRD: In general, I love the idea of NuxtHub wiring-up modules on Cloudflare by default (e.g. D1 for database, Workers KV for KV-storage, R2 for blob, ...) but being open to wire-up other providers for these modules by leveraging Nitro/UnJS (#179).

I'm pretty exited for first party Nitro Database, and in general, IMO one of the greatest strengths of NuxtHub is leveraging nitro and maintaining its provider-agnostic spirit (powered also by the great UnJS ecosystem).

I definitively agree, it would be great if the admin UI of NuxtHub uses useDatabase() in order to connect to the databases defined in the project's nitro.config/nuxt.config. Then the user should be able to select which database he wants to view/edit, much like the "DevTools > Storage" UI allows selecting which drive from multiple.

Allowing this, despite having to manually create these resources externally on the corresponding providers without an automation would probably already be good enough for more users (I speak at least for myself), and could probably be come faster. The automations could be introduced later if the team decides it, I understand this might be out of scope for NuxtHub itself, which is built (at least for now) primarily on Cloudflare.

I'm guessing this work is sort of waiting for nitro@v2 to include database out-of-the-box (not experimental)? (#15 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants