title: ActiveMQ Shared File System Master Slave on Amazon EC2
body: <p>We want to use an ActiveMQ <a href="http://activemq.apache.org/shared-file-system-master-slave.html" rel="nofollow noreferrer">master/slave configuration based on a shared file system</a> on Amazon EC2 - that's the final goal. Operating system should be Ubuntu 12.04, but that shouldn't make too much difference.</p>
  
  <p><em>Why not a master/slave configuration based on RDS?</em> We've tried that and it's easy to set up (including multi-AZ). However, it is <a href="http://activemq.apache.org/masterslave.html" rel="nofollow noreferrer">relatively slow</a> and the failover takes approximately three minutes - so we want to find something else.</p>
  
  <p><em>Which shared file system should we use?</em> We did some research and came to the following conclusion (which might be wrong, so please correct me):</p>
  
  <ul>
  <li>GlusterFS is <a href="https://stackoverflow.com/questions/9415265/glusterfs-as-shared-storage-for-activemq-master-slave-cluster">often suggested</a> and should be <a href="http://sanketdangi.tumblr.com/post/5601762671/gluster-config-aws-multi-az" rel="nofollow noreferrer">supporting multi-AZs fine</a>.</li>
  <li>NFSv4 should be working (while NFSv3 is said to <a href="http://activemq.2283324.n4.nabble.com/Feasibility-of-Shared-File-System-Master-Slave-using-NFSv4-td3536513.html" rel="nofollow noreferrer">corrupt the file system</a>), but I didn't see too many references to it on EC2 (rather: <a href="https://serverfault.com/questions/347936/redundant-nfs-on-amazon-ec2">asked for NFS</a>, got the suggestion to use GlusterFS). Is there any particular reason for that?</li>
  <li><a href="http://www.canonical.com/about-canonical/resources/white-papers/what%E2%80%99s-new-ubuntu-server-1204-lts" rel="nofollow noreferrer">Ubuntu's Ceph</a> isn't stable yet.</li>
  <li>Hadoop Distributed File System (HDFS) sounds like overkill to me and the NameNode would again be a single point of failure.</li>
  </ul>
  
  <p><em>So GlusterFS it is?</em> We found hardly any success stories. Instead rather dissuasive entries in the bug tracker without any real explanation: <a href="https://issues.apache.org/jira/browse/AMQ-4071" rel="nofollow noreferrer">"I would not recommend using GlusterFS with master/slave shared file system with more than probably 15 enqueued/dequeued messages per second."</a> Does anyone know why or is anyone successfully using ActiveMQ on GlusterFS with a lot of messages?</p>
  
  <p><em>EBS or ephemeral storage?</em> Since GlusterFS should replicate all data, we could use the ephemeral storage or are there any advantages of using EBS (IMHO snapshots are not relevant for our scenario).</p>
  
  <p>We'll probably try out GlusterFS, but according to Murphy's Law we'll run into problems at the worst possible moment. So we'd rather try to avoid that by (hopefully) getting a few more opinions on this. Thanks in advance!</p>
  
  <p>PS: <em>Why didn't I post this on ServerFault?</em> It would be a better fit, but on SO there are 10 times more posts about this topic, so I stuck with the flock.</p>