Write Scaling Architecture Low-Level Design: Sharding, Write Batching, Async Processing, and CQRS Command Side
The Write Scaling Bottleneck In a standard primary-replica setup, all writes go through a single primary database. The primary's write […]
The Write Scaling Bottleneck In a standard primary-replica setup, all writes go through a single primary database. The primary's write […]
Read Scaling Overview Read scaling addresses the most common bottleneck in production systems: reads vastly outnumber writes (often 10:1 to
What Are CRDTs? A Conflict-free Replicated Data Type (CRDT) is a data structure with a mathematically defined merge operation that
What Is Multi-Master Replication? In multi-master replication, all nodes are primaries — every node accepts both reads and writes simultaneously.
What Is Active-Passive Architecture? In an active-passive architecture, a single primary node handles all incoming traffic — reads and writes.
What Is Active-Active Architecture? In an active-active architecture, multiple regions (or data centers) simultaneously accept writes and serve reads. Every
Single-Leader Model In leader-follower (primary-replica) replication, all writes are routed to a single designated leader. The leader applies writes to
CAS Semantics Compare-and-swap (CAS) is a single atomic operation: compare the current value at a memory location with an expected
What Is a Lock-Free Queue? A lock-free queue provides a progress guarantee: at least one thread makes progress even if
What Is a Deadlock? A deadlock is a situation where two or more transactions are each waiting for a lock
What Is Pessimistic Locking? Pessimistic locking is a concurrency control strategy that assumes conflicts are likely and acquires locks before
What Is Optimistic Locking? Optimistic locking is a concurrency control strategy based on the assumption that conflicts between concurrent transactions
What Is Serializable Isolation? Serializable isolation is the strongest standard isolation level. It guarantees that the result of executing a
What Is Repeatable Read Isolation? Repeatable read is an isolation level that guarantees a transaction always sees the same data
What Is Read Committed Isolation? Read committed is the weakest practical isolation level. It guarantees that a transaction only reads