| I'm using sqlite and litestream in a side project of mine; it's "in production" in the sense that there are a handful of friends and acquaintances using the system, and I'm hoping to scale it up to more people in the future. Short answer: Litestream was really easy to set up to replicate to Cloudflare's R2 (api is S3 compatible), and basically Just Worked. That said, a handful of people's worth of data isn't exactly stressing its functionality; I have no idea how well it scales. I did some manual restores to make sure that it works, but I'm not (yet) doing regular verification tests on the data to ensure that there's been no data corruption (other than its own auto-checking, which of course could itself be broken). There are a couple things I like about sqlite. First, somewhat simplified administration, as you don't need to set up a Postgres instance. I find it easier to test, because you just create test databases in temporary files and throw them away. Secondly, the application I'm using has some data that's common and almost entirely read-only, and some data that's user-specific and read-write; sqlite makes it possible to divide these into different files, such that there's a single "shared.sqlite" database and each user has a "user.sqlite" database, and to join the two in a single "view" using the "attach" command. The data now is essentially pre-sharded: if I ever did need to scale past a single machine (or at some point if I want instances closer to where people), I'd just have to replicate the shared data and move the user-specific data to the appropriate instance, without any major refactoring or fancy synchronization needed. The main downside of this is wrt litestream is that litestream's configuration file isn't really designed for this; you have to have a separate entry for each of these databases, and often you have to duplicate settings across them because most of the settings don't have a global setting you can make. At the moment, every time I add a user I have to regenerate an even-larger configuration file. But that turns out to be fairly straightforward; and at some point I should be able to write my own daemon using the litestream golang package to do what I need to do, rather than using the litestream daemon. |