I am building SaaS application where video files are downloaded and then uploaded and deleted. So far the free 3GB persistent volume storage is ok but I expect that in the future there could a need to temporally increase the volume to accommodate the need of requested download.
In the future I want to offer to SaaS user to edit the video file before uploading. I guess I will need additional RAM for editing. So I have the same question. Can I somehow increase RAM when needed?
fly scale memory <size-in-megabyes> (docs).
You can, likewise, change the number of VMs (
fly scale count <number>), change regions (
fly regions add <list-of-region-ids>) where they are deployed to, change vCPUs available to the VM (
fly scale vm <cpu-type>) on-the-fly (all of which are idempotent ops: Managing applications with code - #2 by kurt).
Similarly, disk space may be increased too (but never decreased): Increase disk capacity on VM - #2 by ignoramous
Note though, you’d typically need at least 2 or more app instances to avoid downtime when the app is being scaled up or down.
not sure if I understood correctly. Currently we need just sometimes additional diskspace. The size may vary. Lets say 1-10GB.
Is it possible temporarily add volume. Like
- check if the app needs extra space and how much
- add x GB of disk - how much would take this?
- use the space
- remove / release the space
- all that while the app is up and running?
Unless there’s some unannounced improvements, or announced features that I missed, I don’t think that’s quite possible today.
Can a workaround like creating a new machine with a volume on demand to edit a file work for you?
hmmm, I think so. But how the pricing works for permanent volume? Let’s say that I will create 10GB persistent volume for that new machine and then I will be charged only when it is up?
I cannot confirm it but the documentation says:
Volume billing is pro-rated to the hour.
I expect you will also pay for the machines’ CPU and Memory during their usage as a file server.
I think we can check it by creating some applications with volumes and checking the usage at the user dashboard.
Unfortunately, the dashboard does not work for me now, I got the error page for Volumes usage :
Whoa, something’s up…
Looks like we’re having some issues. Try again later, or feel free to contact us if the problem persists.
how would the new machine provide disk space to the original one?
You would like to keep the app running while adding the volume. I cannot find a direct way to mount a fly volume without stopping an application and redeployment. I suggest you can make NFS share on the second machine and mount it to the first one.