LiteFS GET request containing writes + LiteFS with multiple processes

That sounds pretty good, :black_cat:, if the external source can be relied on to return the same thing.

Machines never share volumes, so you do need multiple. Many people find that they can run 3 LiteFS nodes while staying within the free allowance.

But if you have more than 1GB of data already, then it will cost more, it’s true.

LiteFS replicates the entire database, rather than individual rows, which is both a strength and a weakness.


Tangent: People have asked in the past whether they could just store the non-primary-candidate nodes’ copies on those Machines’ built-in ephemeral root partitions instead. The LiteFS docs say that you “must place this directory on a persistent volume”, and Fly generally wishes that the root partition could be made strictly read-only. Moreover, the exact size and the like are not set in stone. I wouldn’t recommend using it for anything serious, even if it maybe does work at present…


Your Node application should be writing (only) to /litefs/, but LiteFS will be transparently turning those into actions on /var/lib/litefs/. This is decided in litefs.yml, in the fuse and data sections.

FUSE is the mechanism that allows LiteFS to intercept reads from and writes to the /litefs/ filesystem hierarchy.

It is, but you definitely do want retry logic. Jobs can fail even in the single-node case, to be sure.

(Also, the LiteFS event stream is made to be kept open and read line by line, rather than polled. This isn’t super-convenient in bash; I was thinking more of Ruby or Racket.)