- How to serve the files over http (something like https://gfs1.com/1.jpg)?
It depends on your content. If you want to serve them as static resources, you can serve them via reverse proxy Nginx, Apache httpd,... by pointing resource URL to your mounted volume (FUSE module). Something like:
location /images {
root /mounted_point/;
}
If it is secret content, needs authorization and so on, you can serve them by your own web API
- Secondly, every time I have to put a file inside glusterfs cluster, I have to do it through client server (placing inside volume) and then it getting replicated and distributed automatically?
There are two ways to deal with files from Gluster. It is FUSE modules using Gluster Native Client and libgfapi interact directly with Gluster. You can read more about it here https://staged-gluster-docs.readthedocs.io/en/release3.7.0beta1/Features/libgfapi/
By the first one with FUSE module, the only thing you need to do is put your files into the mounted volume in your Glusterfs Client server. Glusterfs will take care of the rest (distributed, replicate,...)
What happens in case the client server dies? I can't access the volume or upload new files?
- You can keep the availability of your Glusterfs Client by adding more Glusterfs Client server. All of it would show the same files from your Gluster.
- libgfapi, interact directly to your Gluster server, no client needed.