I'm setting up a high-availability shared-nothing geographically-distributed web server, using multiple A-records for its domain. Right now I'm more concerned with high availability -- "When I unplug any one power cord, every browser can still see my web site" -- than speed.
The web server software runs inside one virtual machine per physical box. (Does it really matter that which web server and hypervisor I'm using? If it does, I'm currently using Apache and VirtualBox)
Someone recommended I dump the current horrifically complicated home-grown system that I was planning to use to keep the web servers synchronized, and replace it with Gluster.
Which one of these alternatives is better?
Have the host OS run only the hypervisor and store only the VM disk image. Inside each virtual machine, install the Gluster software, set up a GlusterFS mount point pointed at some folder (brick) inside the VM disk image, and use that mount point (or a folder inside it) as the web root.
Have the host OS run only the hypervisor and store both the VM image and separately a folder (brick) that I allow the VM to access. Inside each virtual machine, install the Gluster software, set up a GlusterFS mount point pointed at the brick outside the VM disk image, and use that mount point (or a folder inside it) as the web root.
Have the host OS run the hypervisor and Gluster. On the host OS, set up a GlusterFS mount point pointed at some folder (brick) elsewhere on the actual physical disk. Allow the VM to access the GlusterFS mount point as the web root. (No need to install Gluster software inside the virtual machine).
Have the host OS run the hypervisor and Gluster. On the host OS, set up a GlusterFS mount point pointed at some folder (brick) elsewhere on the actual physical disk. Since both web servers should be identical, tell the hypervisor to store the virtual disk image inside the GlusterFS mount point.
Something else?
I suspect someone who knows more than I do about Gluster can immediately say "If you do #4, (some horrible thing will happen), and (some other number) causes (some other horrible thing) ... so the only option that actually works is (the only remaining number)". (I.e., I don't think this is a subjective question).
(The "optimization" mentioned at Can someone explain this GlusterFS setup? could apply to any of these alternatives).