The Desi Architect
Notes / Building Blocks
Track 2

Building Blocks

The parts every design reuses: load balancers, DNS and CDN, caches, Redis, shards and leaders.

guide

Load Balancers and the Hash Ring

One front door in front of many servers sounds simple until a node dies, a new one joins cold, or a cache loses most of its keys in one minute. This page covers L4 versus L7, the balancing algorithms, health checks, the hash ring, and how to keep the balancer itself from being the thing that fails.

20 min read
guide

DNS, CDN and Reverse Proxies

Before your code runs, a request has already been through a name lookup, probably a CDN edge, and a reverse proxy. This page follows that path, shows where each hop saves you time or money, and where each one quietly hurts you.

20 min read
guide

Caching Strategies

A cache is a bet that the same question will be asked again. This page covers where to put the cache, how reads and writes should flow through it, what really happens when a step fails, and how a good cache falls over on the busiest night of the year.

20 min read
guide

Redis Field Guide

One thread, one RAM, a dozen data structures. Redis is fast because it does very little per command, and it is dangerous for the same reason. This page covers what each structure is for, what is atomic and what is not, how it survives a restart, and how to scale it without losing your data quietly.

24 min read
guide

Partitioning and Sharding

One database box eventually runs out of disk, memory or write capacity. Sharding splits the data across machines by a key. The hard part is choosing that key, because every query, every transaction and every future resize depends on it.

20 min read
guide

Replication and Leader Election

Keep copies of your data on more than one machine, let exactly one machine take the writes, and have a safe way to pick a new one when it dies. This page covers how the copies stay in step, how Raft picks a leader, and why a stale leader is still dangerous.

22 min read