What is a proper pattern to serve images from cluster

9/14/2021

I have a problem with scaling an app, I want to serve static images from my server, but I can not find any useful information on how to do this. I use Kubernetes, Nginx and my services are running on express.js. I have 2 ideas but I would like to ask you before I will start implementing one of them.

So my first idea is to create global storage using gluster or cephfs but I have never worked with this technology and it seems to be tough to set up the cluster.

The second idea is to save the URL as machine_ip/path but I am not sure if exposing machine IP and path like that, does not break some security rules. Here is a question is it possible to generate a URL for the file to hide path and ip?

Maybe you have another idea or tips? I know I can use s3 but in my case, there are a lot of IOPS I am kind of worried about the price.

-- GooMee
ceph
express
kubernetes
nginx
node.js

0 Answers