title: CAP with distributed System
body: <p>When we talk about nosql distributed database system, we know that all of them fall under the 2 out of three of CAP theoram. For a distributed cluster where network failure and node failure are inevitable partition tolerance is a necessity hence leaving us to chose one from availability and consistency. So its basically CP or AP.</p>
  
  <p>My questions are</p>
  
  <ol>
  <li><p>Under which category does hadoop fall into.</p></li>
  <li><p>Let's say I have a cluster with 6 nodes ABC and DEF, During a network failure let's say node A,B,C and node D,E,F are divided into two independent cluster.</p>
  
  <p>Now in a consistent and partition tolerant system (CP) model since an update in node A     wont replicate to node D the consistency of the system wont allow user to update or read data till the network is up again running, Hence making the database down. </p>
  
  <p>Whereas an Available and partition tolerant system would allow the user of node D to see the old data when update is made at node A but doesn't guarantee the user of node D of the latest data. But after some time when the network is up running again it replicates the latest data of node A into node D and hence allows the user of node D to view the latest data.</p>
  
  <p>From the above two scenarios we can conclude that In an AP model there is no scope for database going hence allowing user to write and read even during failure and promises user  latest data when the network is up again, So Why do people go for Consistent and partition tolerant model (CP). In my perspective during network failure (AP) has an advantage over (CP) allowing user to read and write data while the database under (CP) is down. </p></li>
  <li><p>Is there any system that can provide CAP together excluding the concept of Cassandra's eventually consistency.</p></li>
  <li><p>When does a user Choose availability over consistency and vice versa. Is there any database out there that allows user to switch its choice accordingly between CP and AP.   </p></li>
  </ol>
  
  <p>Thanks in advance  :)</p>