Vivcre Learn
- System Design
CAP: What a Partition Actually Forces You to Choose
Why, when the network splits, a replica has exactly two options — and why the real choice is CP vs AP, not 'pick two of three'.
- System Design
PACELC: The Tradeoff That's Always On
CAP only describes the rare partition. PACELC adds the truth that even on a healthy network, every read trades latency against consistency.
- Database
Three Join Algorithms, and When Each Wins
Nested-loop, hash, and merge joins exist because the cheapest way to combine two tables depends on their sizes, indexes, and sort order.
- Kafka
Kafka Is a Log, Not a Queue
A Kafka partition is an append-only log; consumers don't remove messages, they advance their own offset — which is why many can read the same stream and replay it.
- Kafka
Kafka Partitions and Replication: Where Availability Is Spent
Splitting a topic into partitions buys parallelism at the cost of global ordering; replication plus acks decides durability versus availability.
- Database
Why an Index Turns 200,000 Reads Into 4
How a database physically finds a row, why un-indexed lookups scale linearly, and how a B-tree collapses that to a handful of page reads.
- Database
Compaction: The Triangle You Can't Escape
Size-tiered vs leveled compaction, and why every LSM engine must pay one of read, write, or space amplification.
- Database
Composite Index Column Order: Equality First, Range Last
Why the column order in a multi-column index decides whether the planner can use it, and the equality-first, range-last rule that follows from how the index is sorted.
- Database
Covering Indexes and the Index-Only Scan
How an index that contains every column a query needs answers it without ever touching the heap — and the MVCC caveat that quietly breaks the trick.
- Database
From Lost Updates to MVCC: Isolating Concurrent Transactions
How a naive concurrent counter loses updates, why pure locking creates a traffic jam, and how multi-version concurrency control lets readers and writers stop blocking each other.
- Database
MongoDB Data Modeling: Start From the Workload
Why MongoDB inverts relational modeling — shape the data around the queries — and how embed-vs-reference is the same read/write tradeoff you already know, one level up.
- Database
How LSM Trees Make Writes Cheap
Why write-heavy databases buffer in memory and merge sorted files on disk.