CAP is a theorem/standard which can be applied while designing distributed systems like distributed databases. A distributed database is a set of databases(nodes) which are spread across the network. These set of databases(nodes) in the distributed database can be either designed as either a master/slave or a sharded model . Consistency - Database should return the latest write on the DB. Availability - Database should return data in a decent amount of time . But, the data might not be latest. Partition tolerant - I n spite of n/w failure, the database should always be available. A distributed database can be designed either as a CP, AP, CA but not with all the 3 capabilities. AP - Available and Partition tolerant - Sharded model (Data is distributed, No Master) - Availability - Because, the data is distributed, any of the nodes can return the data. So, always availabl...
Comments
Post a Comment