Look into dns loadbalancing. Closest would be "first to respond" which correlates to latency to server (fastest connection) and maybe load on the server.
Self-Hosted Main
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
For Example
- Service: Dropbox - Alternative: Nextcloud
- Service: Google Reader - Alternative: Tiny Tiny RSS
- Service: Blogger - Alternative: WordPress
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
- Awesome-Selfhosted List of Software
- Awesome-Sysadmin List of Software
Surely it's possible, but what is the advantage of selecting the closest one? Are your bulk file transfers heavily impacted by a few dozens of milliseconds of latency?
Unless your vps has unlimited storage I'd be weary of that when it comes to pricing and uploading raw photos or video. It's not like you're working with jpgs here.
Have you looked into a NAS and cloud storage?
Set the dns server in each location to point to the local clone?
I am considering doing something similar, but for backup, how are you planning on syncronising the shares? I was gonna try syncthing
Here is the problem you face speaking very generically. If you cache everything on the clients access is fast but storage is an issue. If you cache on the LANs speed is an issue. You can try to store on an internet VPS but storage costs are high. You can cache just the index, “Google Drive” style and download/cache only as needed. This probably works the best because you control it down to the file level and speed is not an issue because you work iff local copies. Otherwise any scenario is going to be up against the bandwidth problem.