I understand in Mongo we can have one master and multiple slaves where the master will be used for writes and slaves will be used for reading operations. Say M1, M2, M3 are nodes with M1 as master
But I read Cassandra is said to be a master-less model. Every node is said to be master. I did not get what it means?
Say M1, M2, M3 are nodes with M1 as master and M2, M3 are slaves in Mongo I believe write will always go M1 and read will always go to M2, M3
Say C1, C2, C3 are nodes in Cassandra Here I believe write and Read request can go to any node. That's why it is called master-less model.
You are right, the nodes in Cassandra are equal and all of them can respond to user's query. That's because Cassandra picks Availability and Partition Tolerance in the CAP Theorem (whereas MongoDB picks Consistency and Partition Tolerance). And Cassandra can have linear scalability by simply adding new nodes into the node ring to handle more data.
The tradeoff here is the consistency problem. In Cassandra, they provide a solution called Replication Factor and Consistency Level to ensure the consistency as much as possible while maintaining strong availability.
Here is a good explanation of how read, write and replication work in Cassandra: brief-introduction-apache-cassandra
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With