Hacker News new | ask | show | jobs
by kentonv 67 days ago
To clarify, there are two approaches you can take to handle large-scale databases on Cloudflare:

With Durable Objects[0], you can create and orchestrate millions of sqlite databases that live directly on Cloudflare's edge machines. The 10GB limit applies to one database, but the idea is you design your system to split data into many small databases, e.g. one per user, or even one per document. Since the database is literally a local file on the machine hosting the Durable Object that talks to it, access is ridiculously fast. Scalability of any one database is limited, but you can create an unlimited number of them.

If you really need a single big database, you can use Hyperdrive[1], which provides connection management and caching over plain old Postgres, MySQL, etc. Cloudflare itself doesn't host the database in this case but there are many database providers you can use it with.

[0] https://developers.cloudflare.com/durable-objects/

[1] https://developers.cloudflare.com/hyperdrive/

(I'm the lead engineer on Cloudflare Workers.)