3
I'm running a website that uses user-uploaded files heavily. Those files are served to users only after a permission check by a Django application.
Now I need to scale horizontally and spin up another instance of a web server. It needs to have access to the same directory structure that contains uploaded files. What I likely need is some distributed filesystem.
I've been thinking about:
- NFS — done that 15 years ago and even then I felt that standard was quite outdated. Although robust and easy to set up, the lack of transfer encryption and the need of syncing UIDs/GIDs between servers creates more problems than it solves.
- periodic rsync — sounds like a dirty hack and would probably lead to out-of-sync problems. And take N times the storage size for N servers.
- sshfs — well, if it has the same performance as scp, I don't want to hear about it actually.
- LustreFS , Gluster, or other DFS — never used those and have no idea which would suit my needs. Redundancy is not critical (we have frequent backups) but I'd like to have the traffic between servers encrypted.
What would you recommend?
Re: NFS encryption - have you considered using a VPN between the nodes? If you don't want to go as heavy as an IPSec VPN, WireGuard would be a good alternative that may meet your performance needs.
– AfroThundr – 2019-04-19T20:49:54.113Thanks, @AfroThundr I'm reading about tinc Do you know how they compare?
– emesik – 2019-04-19T20:59:08.103I've never used Tinc personally, but from several other discussions on HackerNews, it would seem that Tinc also incorporates a mesh networking and self-healing capability, but lags behind WireGuard in straight performance. They're both still fairly lightweight though, compared to Strongswan or OpenVPN.
– AfroThundr – 2019-04-19T21:20:23.903