I need to be able to synchronize changes for a specific file (and in another implementation a directory) between multiple servers running FreeBSD. The file should be updated as soon as it's changed on any one of the servers. It does not need to occur synchronously, but file permissions/ownership need to be retained. I can tolerate a delay, the main requirement is that it happens automatically without me having to manually kick off a command. I'd also like to be able to setup a hook or watch so that when the file is updated, a command is executed.
I don't think net/rsync is the solution here, unless there is a way to have it behave in the way I described above. I looked at net/syncthing a few years ago. Last I checked it has a slight issue where is complains about being run as root. I was thinking I could run multiple instances of it, but seems like the rc script on that doesn't support that at the moment. GlusterFS is obviously not an option since there are some low level issues with it in regards to it depending strongly on epoll that the upstream devs do not want to address (and I haven't had the time to port it to kqueue/kevent).
I don't think net/rsync is the solution here, unless there is a way to have it behave in the way I described above. I looked at net/syncthing a few years ago. Last I checked it has a slight issue where is complains about being run as root. I was thinking I could run multiple instances of it, but seems like the rc script on that doesn't support that at the moment. GlusterFS is obviously not an option since there are some low level issues with it in regards to it depending strongly on epoll that the upstream devs do not want to address (and I haven't had the time to port it to kqueue/kevent).