title: HDFS Namenode HA: Why use NFS rather than simply replicate between the two?
body: <p>Looking at the AvatarNode solution used by Facebook to provide HA for the HDFS Namenode, I don't understand the reason why NFS is used.  What's confusing to me is that NFS has to replicate anyway in order to achieve HA.  The primary has to write to NFS and flush in order to have HA.  Why not simply open up a socket channel between the primary and the secondary and perform the same writes to the secondary Namenode.  It would be (approximately) the same amount of network traffic and would seem to have the same replication semantics.</p>
  
  <p>So the question is, why isn't this done?</p>
  
  <p>I suppose that one reason could be that NFS exists and so the problem may be perhaps simpler to implement.  But given the (apparent) simplicity of using raw socket channels between the primary and secondary writing the same information that's written to the stream interface (i.e. a file) to NFS, I'm left scratching my head as to why this hasn't been done yet.</p>
  
  <p>Surely there must be some good reason for opting to use NFS that I'm missing in my armchair analysis.</p>