Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Replication: Leader-Based, Multi-Leader, Leaderless and Quorums
Replication comes in three topologies: a single leader (simple, with split-brain risk on failover), multi-leader (writes in every region, conflicts are unavoidable) and leaderless quorums (a read sees the latest write if R + W > N). In an N=3 quorum simulation, R=W=1 returns a stale stock value, the system refuses writes when two nodes are down, yet a "failed" write survives on one replica and becomes visible once the nodes return.
Scaling the Data Layer: Replication, Sharding and SQL vs NoSQL
Scaling the data layer starts with access patterns: replication scales reads and availability but not writes, and sharding scales writes but turns queries without the shard key into scatter-gather. In a million-order experiment the customer query returns from one shard in 0.1 ms while the last-30-days query scans all four shards end to end; an async replica doesn't show a new order and needs a read-your-writes fix, and going from 4 to 5 shards with hash % N moves 80% of customers.