Volumes replicas

In the documentation I read that:

A volume is directly associated with only one app and exists in only one region. No other app can see this volume and only an instance of the app running in the region can access it.

I would like to implement a LevelDb database along my application, and have the application run for several regions (at least three).

Is it possible to somehow have “volume replicas” like there are Postgres replicas? I would like all my apps from the different regions to be able to access to a common volume with the lowest latency possible. Some sort of “shared volumes”.

A 1 write volume for n read volumes would be fine to me.

Do you think it is possible? How would you do that? My application uses LevelDb but I’m also curious to know if it would be possible for a standard file system as well. All apps sharing the same files but with replicas around the world for fast access.

Fly volumes are neither distributed nor replicated. Fly haven’t commit to building one, either.

Not really the kind of replication you’re looking for, but you can consider running Ceph with BlueStore and cluster it up as a Block Device with read-cache. I am not aware of anyone running Ceph on Fly. And it frankly sounds non-trivial to do so.

Btw, here’s an example Fly app running a MinIO cluster (a S3 clone). Then, there’s this poor-man’s Fly-clone, Apache Helix, which bundles in a replicated fs, but seems like an overkill to run Helix on Fly!

You could also get fancy with other rsync-based replication setups (like volsync / orifs / sfs); tbh, I’d be wary of using those in production.

Someone’s running IPFS on Fly (which functions like git+rsync), so that’s there too.

2 Likes

Very interesting, thanks for your answer.

I wonder how Postgres replicas work internally? Postgres instances are mounted on fly volumes so this is close to what I’m looking for.

For the MinIO example, there is no replica system neither I guess? A bucket is associated to “the region where the app is”. But if the app leaves in multiple regions, then there will be multiple independent buckets.

As a concrete example, if a user fly from America to Europe, will he then be connected to the EU MinIO volume and lose his profile picture?