Will it work?
nekky
HOBBYOP

a year ago

I plan to create a minimal FastAPI application that will have several endpoints for handling files. The main idea is as follows:

  1. One of the endpoints will accept a user ID and an image file (e.g., an avatar). This file should be saved in the Volume with a structure like avatars/{user_id}/{file_name}.

  2. Another endpoint will accept the user ID and a specific hash, which will be used to locate and return the corresponding file from the same Volume.

  3. I plan to use the Volume feature, which provides 5 GB of disk space for storing files. Files, such as user avatars, will be uploaded, stored, and then made available for download or display.

Will this scenario work correctly? I would also like to ask:

  • Are there any limitations on read/write operations on the Volume (e.g., in terms of speed or the number of operations)?

  • How can I manage stored files (access the Volume) through the Railway interface or CLI?

Or is it better to just write the same minimal application but integrate it with Google Cloud Storage?

Solved

14 Replies

nekky
HOBBYOP

a year ago

N/A


brody
EMPLOYEE

a year ago

Will this scenario work correctly?
Yes, as long as you write the code to achieve the desired results.

Are there any limitations on read/write operations on the Volume
No, you would run into an application bottleneck before anything.

How can I manage stored files (access the Volume) through the Railway interface or CLI?
This functionality would need to be built into your application.


nekky
HOBBYOP

a year ago

Got it, thanks. But what would you do if you were me? Wouldn't it make more sense to use special services for this?


brody
EMPLOYEE

a year ago

special services for what?


nekky
HOBBYOP

a year ago

For file storage and processing


nekky
HOBBYOP

a year ago

As I gave an example above. For example, Google Cloud Storage


brody
EMPLOYEE

a year ago

what happened to using a volume?


brody
EMPLOYEE

a year ago

i dont see any issues for using a volume


nekky
HOBBYOP

a year ago

I'm just wondering. This is the first time I've come across it. There is basically no difference between Volume and Google Cloud Storage, one or the other uses folders and stores information, files and so on in them.


nekky
HOBBYOP

a year ago

So, as someone who has encountered this for the first time, I'm wondering what the difference is


brody
EMPLOYEE

a year ago

there is a gigantic difference, a volume is file storage on disk (ssd in this case) and google cloud storage is an API based storage server


nekky
HOBBYOP

a year ago

Got it. I'll take care of it. Thanks for your help


brody
EMPLOYEE

a year ago

no problem!


brody
EMPLOYEE

a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...