Tagged “Distributed-Systems”
10 articles with this tag.
- CAP and PACELCWhat the CAP theorem actually says (and what it does not), why 'pick two of three' is misleading, CP versus AP systems during a partition, the latency-consistency trade-off that PACELC adds for normal operation, tunable consistency, and how to use these ideas in a system design discussion.
- Consistency and consensusThe strongest guarantees a distributed system can offer and what they cost: eventual consistency versus linearizability, the CAP trade-off made precise, causal ordering, Lamport timestamps, total order broadcast, two-phase commit and its blocking problem, consensus algorithms (Raft, Paxos, Zab), and coordination services like ZooKeeper and etcd for leader election and locks.
- Consistent hashingWhy hash mod N breaks when servers change, how consistent hashing places servers and keys on a ring so only a fraction of keys move, virtual nodes for balance, replication along the ring, rendezvous hashing and jump hash, a Java TreeMap implementation, and where consistent hashing is used.
- Distributed Key-Value StoreA highly available key-value store designed from first principles: consistent hashing with virtual nodes, replication to N nodes, tunable quorums (W + R > N), vector clocks and conflict resolution, sloppy quorums and hinted handoff, gossip membership, Merkle-tree anti-entropy, and an LSM-tree storage engine.
- Web CrawlerA distributed web crawler designed with the 18-step framework: the URL frontier with priority and per-host politeness queues, robots.txt, DNS caching, fetchers, parsing, URL normalisation and Bloom-filter deduplication, near-duplicate detection with SimHash, crawler traps, recrawl scheduling and storage.
- IntroductionA repeatable 18-step framework for designing systems and answering system design interviews: requirements, capacity estimation with worked calculations, APIs, data models, architecture, scaling, failure handling and trade-offs.
- Partitioning (sharding)Splitting a dataset across machines: horizontal versus vertical partitioning, partitioning by key range versus by hash, hot spots and skew, local versus global secondary indexes, rebalancing strategies (fixed partitions, dynamic splitting, consistent hashing), request routing, and the cost of cross-shard joins and transactions.
- ReplicationKeeping copies of data on several machines: single-leader replication with synchronous and asynchronous followers, failover and split brain, replication logs, the problems of replication lag (read-your-writes, monotonic reads, consistent prefix), multi-leader and leaderless replication with quorums, sloppy quorums and conflict resolution.
- Distributed systems faultsWhy distributed systems are hard: partial failures, unreliable networks and timeouts, why you cannot distinguish a slow node from a dead one, time-of-day versus monotonic clocks, clock skew and last-write-wins, process pauses, the majority deciding truth, leases and fencing tokens, Byzantine faults and system models.
- Unique ID generationGenerating unique identifiers at scale: requirements (unique, sortable, 64-bit, fast), database auto-increment and multi-master step, UUID v4 and v7, ticket servers and range allocation, and Twitter's Snowflake layout with timestamp, machine and sequence bits — clock rollback handling and a Java implementation.