[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"glossary-cap-theorem::en":3,"gloss-cluster-cap-theorem::en":26,"gloss-next-cap-theorem::en":9},{"slug":4,"category":5,"name":6,"definition":7,"meta_desc":8,"faq":9,"schema_markup":9,"related":10},"cap-theorem","data-infra","CAP Theorem","The CAP theorem states that when a distributed system is partitioned — some nodes can't talk to others due to a network failure — you must choose between consistency (every read sees the latest write) and availability (every request still gets an answer). You cannot have both during a partition. Since partitions are inevitable at scale, CAP is really a forced choice between CP and AP behavior when the network breaks.\n\nA CP system refuses requests it can't answer correctly rather than return stale data; an AP system keeps answering, accepting that replicas may temporarily disagree and reconcile later (eventual consistency).\n\nFor SaaS builders, CAP is a lens for reading your database's guarantees: a banking ledger leans CP, a shopping cart or social feed usually leans AP. Practical note: CAP only bites during a partition — the rest of the time you can have both — and most real systems tune this per-operation rather than picking one globally.","The CAP theorem says that during a network partition you must pick consistency or availability — you cannot have both, so every distributed store takes a side.",null,[11,14,17,20,23],{"slug":12,"name":13},"acid","ACID",{"slug":15,"name":16},"eventual-consistency","Eventual Consistency",{"slug":18,"name":19},"nosql","NoSQL",{"slug":21,"name":22},"replication","Replication",{"slug":24,"name":25},"sharding","Sharding",[27,29,32,35,38,42,45,48,51,55,58,61],{"slug":12,"category":5,"name":13,"updated_at":28},"2026-08-24T02:46:37+00:00",{"slug":30,"category":5,"name":31,"updated_at":28},"ann-search","ANN Search",{"slug":33,"category":5,"name":34,"updated_at":28},"backpressure","Backpressure",{"slug":36,"category":5,"name":37,"updated_at":28},"batch-processing","Batch Processing",{"slug":39,"category":5,"name":40,"updated_at":41},"bm25","BM25","2026-08-24T02:46:38+00:00",{"slug":43,"category":5,"name":44,"updated_at":28},"cache","Cache",{"slug":46,"category":5,"name":47,"updated_at":28},"change-data-capture","Change Data Capture (CDC)",{"slug":49,"category":5,"name":50,"updated_at":28},"chroma","Chroma",{"slug":52,"category":5,"name":53,"updated_at":54},"chunk-overlap","Chunk Overlap","2026-08-24T03:30:02+00:00",{"slug":56,"category":5,"name":57,"updated_at":28},"columnar-storage","Columnar Storage",{"slug":59,"category":5,"name":60,"updated_at":28},"connection-pooling","Connection Pooling",{"slug":62,"category":5,"name":63,"updated_at":28},"cosine-similarity","Cosine Similarity"]