Archive of posts with category 'distributed systems'

A Brilliant Hack: Why does Layer 2/3 Checksum use 1’s Complement, Not 2’s

A Brilliant Hack: Why does Layer 2/3 Checksum use 1’s Complement, Not 2’s

One's complement sums are endianness-independent, so routers verify checksums without ntohs and htons swaps; receivers simply check for all ones.

System Design Interview: Scaling Single Server

System Design Interview: Scaling Single Server

Scaling past one server: stateless API servers, sharded memory caches, consistent hashing, Raft or Paxos replication, and DNS to balance load balancers.

A Primer on Secure Communication Channels

A Primer on Secure Communication Channels

Why clear text, symmetric keys, and raw public keys fail, how PKI and certificate authorities solve key distribution, and what a compromised CA breaks.

Git as Version Vector

Git as Version Vector

Branches as concurrent updates: happened-before causality, why Lamport clocks can't detect concurrent commits, and how vector clocks reveal when to merge.

Sloppy Quorum And Eventual Consistency

Sloppy Quorum And Eventual Consistency

Choosing availability over consistency: NWR quorums where W + R exceeds N keep reads fresh; smaller ones give eventual consistency, measured by t-visibility.

Reliable & Consistent Service: Linearizable RPC and Replicated State Machine

Reliable & Consistent Service: Linearizable RPC and Replicated State Machine

Why at-least-once RPC with idempotent operations isn't linearizable, how a reply cache gives exactly-once semantics, and why it must survive failover.