Skip to content
all episodes
Code of Architecture · episode 09

Database Internals — Episode 3

1:29:14

Episode participants

  • Konstantin Evteev

    guest

  • Oleg Bondar

    guest

Conversation

What we discussed on the recording

The third episode opens distributed systems in Database Internals. Belief in a reliable network and unlimited capacity leads to cascading failures, so systems need bounded queues and backpressure. Channels lose or duplicate messages, while exactly-once delivery relies on retries, idempotency, and deduplication.

The Two Generals Problem explains why message loss prevents guaranteed agreement. The discussion covers consensus validity, termination, and irrevocable decisions, then separates crash, omission, and Byzantine failures. A failure detector cannot prove whether a node is slow or dead; ping and gossip only manage suspicion.

Leader election creates a decision point but introduces split-brain risk. The hosts compare rank-based selection, a ring, and a restricted candidate set. Replication supplies redundancy, while CAP is framed specifically around a network partition, when the system must trade a response against replica consistency.

Consistency models move from registers to linearizability, sequential consistency, and causal consistency. The first respects real time, the second preserves a common order, and the third orders dependencies. Session guarantees include read-your-writes, monotonic reads and writes, and writes-follow-reads. The finale clarifies strong and eventual.

Book series
Database Internals
Alex Petrov
Book playlist