Am I right in assuming that if you're using Litestream (not LiteFS), that you should only run one machine?

I’ve been successfully running apps with a single machine storing my SQLite database files on a Fly volume for a while. In the past day or so, I’ve been trying out Litestream using DigitalOcean Spaces to store the streaming backups. It’s awesome.

However, I realized that fly deploy now defaults to starting up two machines unless you use the --ha=false flag. Wouldn’t running two machines potentially be bad when writing to essentially the same SQLite database?

Or perhaps I’m just confused about how machines work on Fly?

Yes, you’re correct. If you’re running Litestream then you’ll want to only run a single node using --ha=false. The fly deploy command defaults to setting up 2 machines because that’s typical for application servers that run the database on a different server.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.