SysAlchemy

Learn

Three tracks, each gated in order. Finish a lesson, pass its checks, and the matching lab opens. Finish every lesson and lab in a track and you can claim a certificate.

FoundationFree — sign in

Name the pieces. Walk the request.

The spine. One component at a time, then four complete systems. Free once you have an account — progress still unlocks in order.

0/20 lessons · 0/12 labs0%

Free — create an account to keep progress.

Foundations

How a request travels, and why speed, load, and failure are different problems.

  1. Client vs serverA client asks. A server answers. The same machine is often both at once, and which one it is depends entirely on which way the request is pointing.~6 min
  2. Request and responseA request carries intent, a response carries a result or an error, and every architecture diagram you will ever draw is a request path with the timing left out.Sign in
  3. Latency vs throughputLatency is how long one person waits. Throughput is how many people you finish per second. Improving one can leave the other exactly where it was.Sign in
  4. Availability vs consistencyAvailability means you get an answer. Consistency means the answer agrees with everyone else's. Keep a second copy of your data and you will eventually have to choose which one you would rather break.Sign in
  5. Why we scaleYou scale because something specific ran out — CPU, memory, disk, connections — or because one machine failing is not an outage you can afford. Anything else is decoration.Sign in

Building blocks

One component at a time: what it is, when to use it, and what it cannot do.

  1. App serverThe app server is where your logic runs. Its most valuable property is that it holds nothing worth keeping, which is exactly what lets you throw a second one at the problem.Sign in
  2. Load balancerA load balancer is the one address clients know. Behind it, instances can be added, replaced and quietly removed while they are failing, and nobody outside notices.Sign in
  3. DatabaseThe database is the one component holding the only copy of the truth. That is why it is usually the first thing to run out of room, and the last thing you can afford to lose.Sign in
  4. CacheA cache is a fast, incomplete, slightly-out-of-date copy of something expensive. It is the highest-leverage component you can add, and the easiest one to make quietly wrong.Sign in
  5. CDNA CDN is a cache with geography. Your servers are in one place, your users are everywhere, and the speed of light charges for the difference.Sign in
  6. Object storageFiles go in a bucket. The database keeps a short string pointing at them. Mixing those up is one of the few beginner mistakes that gets worse every single day it survives.Sign in
  7. Message queueA queue lets a request record what should happen and return, while the slow part happens after the user has gone. It buys time, and it does not buy capacity.Sign in

First systems

Four complete designs. Depth over a catalog of interview logos.

  1. URL shortenerThe first complete system, and a gift of a first one: the read path and the write path are wildly different sizes, and every component you add has to justify itself against a number.Sign in
  2. Pastebin and file uploadAlmost the same system as the shortener, with one difference that changes everything: the thing being stored is no longer a short string, and might be fifty megabytes.Sign in
  3. Rate limiterA counter per caller, in a store fast enough to check on every request, placed early enough that rejecting costs almost nothing.Sign in
  4. Simple group chatChat has a reputation as the hard one. For a group of six it is a table of messages, an index, and a queue for the notifications — and every piece is something you already have.Sign in
PractitionerBy request

Things fail. Design for it.

What the spine leaves out: timeouts, hot keys, sharding, and work that happens after the response. Labs stop telling you which box is missing.

0/23 lessons · 0/18 labs0%
Ask for access — free →

Staying up

Timeouts, retries that do not stampede, shedding load before it takes the floor out, and knowing when to stop calling at all.

  1. Timeouts and deadlinesA call with no timeout is a promise to wait forever. Deadlines turn one slow dependency into a fast error instead of a queue that eats the whole app tier.Locked
  2. Retries that do not stampedeA naive retry multiplies load exactly when the system can least afford it. Backoff, jitter, and a retry budget keep a hiccup from becoming an outage.Locked
  3. Shedding load on purposeWhen demand exceeds capacity, something must be refused. Choosing what to drop is design; letting the queue decide is an outage.Locked
  4. Breakers and bulkheadsShedding load protects you from your callers. A breaker protects you from the thing you call: it watches the failure rate, stops calling, and fails instantly until the dependency proves it is back.Locked
  5. Knowing before the customer doesTimeouts, breakers and shedding all need a number to fire on, and that number has to come from somewhere. Metrics say what is happening, traces say where, logs say why — and the average hides all three.Locked
  6. Shipping without taking it downMost outages are not caused by traffic. They are caused by the last deploy. Ship to a small slice first, watch the signals you built in the previous lesson, and keep the way back cheap.Locked

Data at scale

Indexes, hot keys, caches that expire together, and splitting one database into many without moving everything.

  1. Indexes and access pathsAn index is a second copy of your data organised for one question. It makes that question fast and every write slightly slower.Locked
  2. Page 5,000 is where OFFSET diesLIMIT 20 OFFSET 100000 asks the database to find a hundred thousand rows and throw them away. Keying off the last row you saw turns every page into the same cheap index lookup.Locked
  3. You just wrote it. Why is it not there?A read replica is a copy that is always slightly behind. Send reads there and the write path gets cheaper — right up until a user saves something and the next screen tells them it does not exist.Locked
  4. The database runs out of connections firstA database connection is not free — it is memory and a process. Fifty app servers holding a hundred connections each is five thousand, and Postgres fell over somewhere around a few hundred.Locked
  5. Invalidation, TTLs, and the stampedeA cache is only fast while it hits. The dangerous moment is the miss — one popular key expires and every request that wanted it goes to the database in the same instant.Locked
  6. Hot keys and uneven loadAverages hide the problem. One celebrity row, one trending code, one popular shard can saturate a single machine while the rest of the fleet idles.Locked
  7. Adding a node without moving everythingPlacing keys with hash mod N is fine until N changes. Adding one node reshuffles almost every key, and the moment you need capacity is the worst possible moment for a cold cache.Locked
  8. Splitting one database into manySharding buys write capacity by giving up the things one machine made easy: joins, transactions, and uniqueness across the whole dataset.Locked
  9. Changing a schema with traffic on itYou cannot stop the world to rename a column. Expand, migrate, contract: add the new shape, write both, backfill, move reads, and only then delete the old one.Locked

Systems that bend

Four designs where the naive answer falls over on the second question.

  1. Sessions, tokens, and logging everyone outLooking a session up in the database on every request makes auth the busiest query you own. Signing a token removes the lookup, and removes your ability to take the token back — until you design for that.Locked
  2. A news feed that loads fastFeeds are the canonical fan-out problem. Precompute for ordinary users, query on read for celebrities, and merge the two at request time.Locked
  3. Notifications without a thundering herdSending a million pushes is easy. Sending them without melting your own API when everyone taps at once is the actual design.Locked
  4. Matching riders and driversA geospatial matching problem with constant writes, a strong locality bias, and a hard requirement that two riders never get the same driver.Locked
  5. Two people, one seatInventory that is checked and then bought minutes later needs a third state between free and sold: held. The hard part is not taking the seat — it is giving it back when the buyer walks away.Locked
ArchitectBy request

Many machines, one answer.

Consensus, multi-region, and ledgers that must never lose a rupee. The hardest labs here start from an empty canvas and have more than one defensible answer.

0/9 lessons · 0/6 labs0%
Ask for access — free →

52 lessons across three tracks. Everything in Foundation is free with an account.