What is split-brain in a clustered Redis or database, and how does it violate the consistency you promised?
PICTURE THIS: GIT FLOW
Simple meaning
Two nodes both believe they are primary after a partition and accept writes that cannot be merged cleanly.
WHY — CAP instead of guessing?
Why interviewers care about CAP:
who only read docs from people who shipped.
and tied to Backend work.
Name the idea, why it exists, then one short example.
End with when you use it and one common pitfall.
STEPS — What happens with tokens?
Before the model can read a sentence, it goes through these steps:
- 1Two nodes both believe
they are primary after a partition and accept writes that cannot be merged cleanly.
- 2Clients then see divergent
balances or lost updates when the partition heals.
- 3Fencing tokens, quorum writes,
and refusing to serve without a majority are how you prefer unavailability over silent corruption.
- 4Context mix
Attention looks at nearby tokens together.
- 5Next token
The model scores what should come next.
- 6Decode
IDs turn back into readable text.
EXAMPLE — See it in action
Let's see how a real sentence is tokenized (tokens may vary by model):
Note: Actual tokens and IDs depend on the tokenizer (e.g., GPT, Llama, etc.).
Key takeaway
Two nodes both believe they are primary after a partition and accept writes that cannot be merged cleanly. Clients then see divergent balances or lost updates when the partition heals.