Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the right method for storing files in a microservice architecture?

I'm currently working on a traditional monolith application, but I am in the process of breaking it up into spring microservices managed by kubernetes. The application allows the uploading/downloading of large files and these files are normally stored on the host filesystem. I'm wondering what would be the most viable method of persisting these files in a microservice architecture?

like image 788
Matt Greene Avatar asked Oct 25 '18 20:10

Matt Greene


2 Answers

You have a bunch of different options, Googling your question you'll find many answers, for any budget and taste. Basically you'd want high-availability storage like AWS S3. You could setup your own dedicated server to store these files as well if you wanted to cut costs, but then you'd have to worry about backups and availability. If you need low latency access to these files then you'd want to have them behind CDN as well.

like image 197
Denis Pshenov Avatar answered Sep 25 '22 07:09

Denis Pshenov


We are mostly on prem. We end up using nfs. Path to least resistance, but probably not the most performant and making it highly available is tough. If you have the chance i agree with Denis Pshenov, that S3-like system for example minio might be a better alternative.

like image 26
Bal Chua Avatar answered Sep 22 '22 07:09

Bal Chua