Replicated shared filesystem
It is possible, though not trivial, to setup NFS Clusters in Amazon EC2 using DRBD for synchronous replication and Pacemaker + Corosync for automating failover of the NFS service and exports between nodes (without interrupting client access).
If you're planning on replicating synchronously ("real-time"), you'll need both your EC2 instances to be in the same zone to limit the latency between them; otherwise that network latency will translate to disk latency.
Also, it's not possible to easily assign/unassign an IP address on Amazon EC2 instances; you need to use their API (or use their web-gui) to reassign an IP address. Moving an IP address is needed for the floating IP address that clients will use to connect to the active node. Some modification of the 'IPaddr2' Pacemaker resource agent will be required to get this working; it's a bash script.
Given the complexity of setting up a replicated NFS server, we're opting to go with S3. The performance of s3fs-fuze was terrible (doing an ls
on a directory with over 1,000 files would take close to a minute due to it needing to query metadata for each file, and caching didn't seem to help). However, I then tried out RioFS, which provided me with instant responses in directory operations and overall felt very fast.
I'm still planning on investigating a few additional options (S3QL and YAS3FS in particular) but so far the options look promising.