is there any temp volume that can be used temporarily. Just when machine runs?
is there a way to add / mount a volume to a running machine?
Those two points came to my mind when I was thinking how to solve the issue I have with disk space / volumes. My machine when requested downloads a pdf file and serves it back. The default volume of 1 GB is good enough for that.
I want to extend my “downloading” service and let the machine download bigger files. Usually it would be around 4 GB. I have not ideal how to solve the issue that I do not want to pay for persistent volume as my machine is 98% of time stopped.
did I understand it right that I can user R2 as a mean to save the downloaded files? I guess I need to mount R2 to do so otherwise the downloading will not work.
I did no find anywhere an example how to mount R2 to my fly machine.
not sure what you mean dynamic. I want to create a service on my fly machine where a user can enter url and then a video on that url will be downloaded via yt-dlp. Then the file will be uploaded to - for example G drive of the user
Imo that’s a bad architecture. You’re paying for ingress, storage, and egress. That will get expensive fast.
Yt-dlp should have a stream option you can use to write to a bucket to avoid storing it locally. Use Tigris, egress should be free is it’s in same region.
Then use presigned urls to avoid bandwidth to users.
I am looking at yt-dlp although yt-dlp outputs stream so I can save it anywhere I am not sure if it is a good idea. Sometimes yt-dlp would merge what was downloaded into the final file and I guess it would need the downloaded files locally.
Actually users will not get the downloaded file directly. My application will uploaded to their Gdrive, Dropbox, Youtube etc
You can attach a volume when you run a machine using the --volume flag, but that volume needs to be created first and it needs to be associated to an app (I think).
You’ll be charged for volumes that you create, whether they are attached to a Machine or not, including when an attached Machine is stopped.
So there’s that… but if you say you need 4 or 5 GB, I’d say the cost is residual… it costs $0.15/GB/month. Alternatively, you could create the volume before launching the machine…