6

I'm setting up some web servers on Google Cloud Compute and I need a directory synced between all the servers to keep the web sites in sync. I'd also like to use the autoscaling feature to provision new servers when needed.

I realise GlusterFS would need to know about all instances but my idea would be to setup monitoring from each server and on new/removed server events auto update the configs. (havent tried this yet though)

Has anyone had experience with either of these systems? If so, how did maintaining either go, and what costs are involved, as I'm not sure if GlusterFS would cost any extra other than the drives it's on, while Google Cloud Storage FS costs for the storage plus for the api commands it runs.

stilliard
  • 161
  • 4

1 Answers1

5

I have used GCS Fuse as a shared directory to a web server before, and I found that it's latency was unacceptably high and that it's transfer speed was a slow when serving files through nginx.

I don't have any experience with GlusterFS, but if you're trying to host shared files for a small to medium traffic website, NFS will perform faster than GCS Fuse with less configuration than GlusterFS.

I currently run a NFS v4 Container VM inside of Google Compute Engine with a persistent disk backing the /exports directory and it works very well. The NFS VM could be implemented on a f1-micro instance with a 100GB Standard Persistent Disk for under $10/month. I'd recommend at least a n1-standard-1 instance and consider using SSD backed Persistent Disk for production. I've posted a gist for creating a NFS VM on GCE

Caleb
  • 153
  • 4
  • Had to modify `privileged.sh` to `sed -i 's/DAEMON_ARGS="/DAEMON_ARGS="--cloud-provider=gce --allow-privileged=true /g' /etc/default/kubelet` to get around this: [Container-VM Image with GPD Volumes fails with "Failed to get GCE Cloud Provider. plugin.host.GetCloudProvider returned instead"](http://stackoverflow.com/questions/37421540/container-vm-image-with-gpd-volumes-fails-with-failed-to-get-gce-cloud-provider) – beatcracker Nov 04 '16 at 00:51