Date: 2024-11-21 10:50:03
Score: 0.5
Natty:
I see a few options here. It strongly depends on how much traffic you expect and thus how much you need to optmize for resources.
- Keep the photos in memory. Not advisable from the perspective of resources, especially if you expect a high load on the application.
- Write the files to the local file system (wwwroot or other). Management of the files can be tricky if you have a lot of users working in parallel. Additionally, you might lose your files if a container / pod is restarted.
- You could use a cache like redis (https://redis.io/) or a storage like S3 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html). Both of which are designed for use cases like yours. If you expect a lot of traffic and have to optimize for resource useage, i would opt for a solution like this.
Reasons:
- Long answer (-0.5):
- No code block (0.5):
- Low reputation (0.5):
Posted by: MikeJ82