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 #106

Open
nelsonic opened this issue Nov 18, 2023 · 2 comments
Open

Cloudflare D1 #106

nelsonic opened this issue Nov 18, 2023 · 2 comments
Labels
discuss Share your constructive thoughts on how to make progress with this issue documentation Improvements or additions to documentation technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

Went looking for other options for hosting a Postgres DB and read the D1 announcement post:
https://blog.cloudflare.com/d1-open-beta-is-here/

image

It looks like a very good product/service focussed on performance.
But the pricing punishes success.
i.e. the more rows your DB has the more you pay:

https://developers.cloudflare.com/d1/platform/pricing/
image

But it's not like in other DB systems where having more than a few millions rows
doesn't incur a penalty other than storage cost and imperceptible query response time increase ...

If your DB has 10k Rows and the App has 1 request per second
and there are 30 x 24 x 60 x 60 = 2,592,000 seconds in a month.

2,592,000 seconds x 10k rows = 25,920,000,000

After the "25 billion/month" included tier,
the next 25 billion will cost:
25,000,000,000 / 1,000,000 x $0.001 = $25/month

If your number of rows increases to 20k your costs don't just double,
because you burn through the "included" tier twice as fast
and then its €50 for the next 25B Rows.
Each incremental increase in the number of rows in the DB drives up the cost of every request.

This could get very expensive very quickly. 💰
There's definitely a good use case for D1 ...
But it bugs me to think of building an app and having accelerating costs. 💭
Also, $0.75 / GB-month for storage is a bit silly. 💸

@nelsonic nelsonic added technical A technical issue that requires understanding of the code, infrastructure or dependencies discuss Share your constructive thoughts on how to make progress with this issue documentation Improvements or additions to documentation labels Nov 18, 2023
@iteles
Copy link
Member

iteles commented Nov 18, 2023

The cost on this does seem a bit prohibitive unless you have an incredibly profitable business already or have VC money to throw at the problem.

@nelsonic
Copy link
Member Author

The database is usually not the most expensive part of a software company, rather the people (engineers) building it are. The reason I still obsess over the cost of DB and storage is because I want anyone to be able to run any/all parts of our stack as cost-effectively as possible. If D1 was price competitive I would seriously consider using it as I trust Cloudflare to do a good job. 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue documentation Improvements or additions to documentation technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

2 participants