I have an app called Rainfall (https://rainfall.dev) that works as a GUI frontend for a static site generator (Faircamp). The basic architecture is that users upload song files to the app, and they are stored on the filesystem of a Fly volume. When it’s time to create a preview of the site the app will generate, the faircamp
binary is run on the uploaded files, which generates a self contained directory structure that contains the user’s site. These files are then served from the app server (not nginx or a static file server) as a preview, because the previews require authorization and are not publicly available.
My basic question is: how do I scale this setup? Currently I have one machine, with one volume. By my calculations, this will satisify about 5000 users, if I scale the volume to the maximum of 500 GB. But that’s a hard limit for this architecture and I would prefer to have options to scale beyond that.
I’m considering trying to set up a GlusterFS cluster inside of a Fly io app, and using Flycast to communicate between the Gluster app and my main app. The main advantage of this is that I would be able to add as many additional volumes as I need to additional cluster members. Additionally, I wouldn’t have to change the architecture of my app because the Gluster storage would be mounted on the app server as a single volume.
I assume I would have to mount a small volume on each server in the cluster to hold the Gluster configuration, as well as additional, larger volumes to hold the user data. One question is, how would I make a Fly volume available to a machine without mounting it, since I will have to create my own filesystem for the Gluster “bricks”? Also does it make sense to use the fly console
command to set up Gluster inside of each of the servers, assuming I can save the configuration to the aforementioned configuration volume?
Please let me know if this makes any kind of sense, or if I’m going in the complete wrong direction, thanks!