Guia de entrevista · System Design

CAP theorem?

do caderno de estudos · atualizado em 2 de outubro de 2026
Para quem vai encarar entrevista de System Design2 min

Não decore palavra por palavra: entenda a estrutura da resposta e refaça com as suas palavras, em inglês.

A resposta, como você fala na entrevista

In a distributed system experiencing a network partition, you cannot guarantee both linearizable consistency and availability for every request to a non-failing node. Linearizable means operations behave like one current copy respecting real-time order. CAP availability means requests complete with responses satisfying the operation's specification, not just that a health check returns 200.
A partition can force an operation to wait or reject, or allow a response that sacrifices linearizability. This is not "choose any two" during normal operation, and CAP consistency is not ACID consistency.
Discuss each operation and invariant. A payment authorization and a cached balance display can have different requirements even within one banking system.

Source: Gilbert and Lynch's CAP result.

Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.

Treinar essa pergunta no app