Can multiple apps access the same volume?

My use case involves using an SQLite database, but since multiple applications need to access the data, I am looking for a solution to facilitate this if possible

No. Volumes are attached to machines and it is 1:1.

If using SQLite is must, we have LiteFS, but this is still beta.

If you only need relational database, we have Postgres, but this is not “managed”.

If you need managed relational database, you could use https://planetscale.com/, https://neon.tech/ or any other DBaaS with us.

Thank you for your message.
To confirm, I have two applications: application 1 and application 2. Application 1 is using SQLite and LiteFS, with LiteFS set as the primary. Application 2 is a new application that can also use LiteFS, but as a replica.
To configure application 2’s LiteFS as a replica of application 1, I will need to set up replication between the two LiteFS instances. Any documents I can follow to set this up. The document above didn’t have example configuration of the replica one or I might missed

Example:
app 1
volume 1 → primary/static

app2
volume 2 → replica

How volume 2 connect to column1 to sync up the data use LiteFS, specifically, which configs make it happen?

Sorry If I didn’t explain well and make it hard. It just something I want to learn using LiteFS, so I don’t need to add another services into my stack.

Thanks

If you’re using a static configuration, you’ll need to put the URL of your primary node into the lease.advertise-url field. You’ll also need to set the lease.candidate field to true on the primary and false on the replicas.

It should look something like:

lease:
  type: "static"
  advertise-url: "http://5683dde7f71498.vm.myapp1.internal:20202"
  candidate: false

Replace the 5683dde7f71498 with the VM ID and replace myapp1 with the name of your app.

There’s also a short section on static leasing in the config: LiteFS Config Reference · Fly Docs

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