Architecture
HomeTechnologyLeadership
  • Software Architecture
  • System Design
    • About System Design
    • Non Functional System Characterstics
    • Back of the envelope Calculations
    • DNS
    • Load Balancers
    • Databases
    • Key Value Store
    • CDN
    • Sequencer
    • Distributed Monitoring
      • Monitoring Server Side Errors
      • Monitoring Client Side Errors
    • Distributed Cache
      • Introduction
      • High-level design
    • Distributed Messaging Queues
    • Pub-sub System
    • Rate Limiter
    • Blob store
    • Distributed Search
    • Distributed Logging
    • Distributed Task Scheduler
    • Shared Counter
  • Design Problems
    • Design YouTube
    • Design Quora
    • Design Google Maps
    • Design Yelp
    • Design Uber
    • Design Twitter
    • Design Newsfeed System
    • Design Instagram
    • Design Tiny URL
    • Design Web Crawler
    • Design WhatsApp
    • Design Typeahead
    • Design Google Docs
  • Design Patterns
    • Monads
    • Singleton
  • Topics
    • CAP Theorem
    • ACID
    • Consistency
    • Failure Models
  • *⃣ Miscellaneous
    • Preparing for SDI
    • 📯Public APIs
    • 👾Glossary
Powered by GitBook
On this page

Was this helpful?

  1. Topics

CAP Theorem

PreviousSingletonNextACID

Last updated 1 year ago

Was this helpful?

Distributed Data Store can only provide two of the following three guarantees.

Consistency

Every read receives the most recent write or an error.

Availability

Every request receives a (non-error) response, without the guarantee that it contains the most recent write.

Partition tolerance

The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes.

In Practice

No distributed system is safe from network failures, thus network partitioning generally has to be tolerated

When a network partition failure happens, it must be decided whether to do one of the following:

  • cancel the operation and thus decrease the availability but ensure consistency

  • proceed with the operation and thus provide availability but risk inconsistency.

CAP theorem indicates that we can’t have availability and consistency under network partitions.