I currently have 2 vps running on the same provider and they serve web files.
server1.example.com
server2.example.com
I used glusterFS to create a file Replication system between 2 nodes. ( server1 is master and server2 is slave )
I am planning to add more servers. But I want them to be on different providers, So I can have better and more file availability.
How should I set them up? Are they supposed to be added as slave? Or maybe like this ?
server1.example.com
(Master)
server2.example.com
(Slave)
server3.example.com
(Master to server4, and Slave to server1)
server4.example.com
(Slave)
Basically yes, I think that's the best scenario I can think of. You don't want to make 3 AND 4 slaves as that'll double your site-to-site transit, whereas in-site transit should be pretty quick so you get the best of both worlds. Obviously if server3 goes down then server 4's copy of the filesystem will be stagnant until server 3 returns but to be honest if server 3 is down for more than an hour or two you could just make server 4 be a slave of server 1 and when server 3 comes back make it a slave of the newly-promoted-to-master server 4.
So yes, basically it seems like you have a good handle on this and it's a well-balanced approach that may need a bit of your expertise in a failure scenario to optimise but looks good to me - gold star to you :)