Загрузка...

CAP theorem — why you can't have all three

What does CAP theorem actually say? Most devs get this wrong.

CAP names three properties: Consistency (every read sees the latest write), Availability (every request gets a response), and Partition tolerance (the system survives a network split). The classic phrasing — pick any two — is misleading. In normal times you actually get all three.

The real rule kicks in only when the network partitions. With two halves of your cluster unable to talk, a write that lands on one side forces a choice. Reject it and stay consistent (CP) — or accept it locally and stay available (AP). You cannot do both.

That's why real systems pick a side under partition. Postgres in a strict setup is CP — it refuses writes when isolated. Cassandra and DynamoDB are AP — they accept writes and reconcile later.

And CAP says nothing about latency. The speed-versus-consistency trade-off has its own name → PACELC: if Partition, choose C or A; Else, choose Latency or Consistency.

CAP is a partition-time choice — not a daily one.

Music: Markvard - Time [NCS Release] (NoCopyrightSounds)
https://ncs.io

#systemdesign #cap #distributedsystems #databases #shorts #programming

Видео CAP theorem — why you can't have all three канала ProCode
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять