Can RAM and Volumes be managed on the fly / demand?

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?

thank you

Yes, with 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.

1 Like

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

  1. check if the app needs extra space and how much
  2. add x GB of disk - how much would take this?
  3. use the space
  4. remove / release the space
  5. all that while the app is up and running?

Thank you

Unless there’s some unannounced improvements, or announced features that I missed, I don’t think that’s quite possible today.

Hi Radek,
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.