Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Cloudflare announces D1 - SQLite DB designed for workers
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Cloudflare announces D1 - SQLite DB designed for workers

blackblack Member

From their blog - https://blog.cloudflare.com/introducing-d1/

Free Egress like R2, cost based off of DB operations & storage.

We will ensure that D1 costs less and performs better than comparable centralized solutions.

Compute (workers), storage (R2), now databases (D1). Maybe this is the next step for cloud computing, going from code to full product without having sysops deal with servers & VMs.

Comments

  • SirFoxySirFoxy Member

    This is dope, I love SQLite for basic things.

  • raindog308raindog308 Administrator, Veteran

    The main use for this is...what?

    If your SQL is pretty light and you just need rarely-updated read-replicas all over the place then sure, this could be fine and the built-in replication is neat.

    But if you have any kind of contention or doing the sort of queries they show in the link (updating products and user totals, etc.), you've ultimately got a single D1 process talking to a single file. Without a DBMS engine easing contention through caching, WAL, accessing different datafiles, etc., isn't that going to be hideous?

    I can certainly see this scaling up to a certain level but once you hit that, if the answer isn't more read replicas, I think you'd hit a ceiling.

    Thanked by 1devp
  • Daniel15Daniel15 Veteran

    @raindog308 said: But if you have any kind of contention

    SQLite handles concurrent reads from multiple threads very well, and even concurrent writes across multiple threads are fine now with WAL2 mode. The DB still gets locked on writes, but only after the transaction is committed until it's persisted to disk, rather than for the entire transaction.

    In the end even things like MySQL are also usually dealing with a single file per table or per DB too. InnoDB used to be a single file for all data, but they started splitting it into separate files at some point.

Sign In or Register to comment.