Pathway 01 · zero → professional

Foundations

One small service, followed all the way down

We follow hitcount, a small service that counts page views for a blog, from source code to process, through its bytes, caches, kernel, concurrent requests and network path, then estimate, profile and question its numbers. Each chapter starts from something that went wrong with it and works out why.

10 chapters~115 min total15 links out0 accounts required
The chapters — one page each
  1. 01From source code to a running processWe meet hitcount and follow it from Go source to machine instructions, a process, its system calls and the stack trace it prints when it crashes.
  2. 02Bits, numbers and textA total that went negative, an average that stopped moving and a title that turned into “Café”: three representation edges, found the hard way.
  3. 03The machine underneathThe same code, 2,500 times more pages: why the answer depends on caches and layout more than on the sort.
  4. 04The operating system’s three liesA throttled container, a silent kill with exit code 137 and a snapshot lost in a power cut, each explained by a promise the kernel keeps imperfectly.
  5. 05Concurrency: two requests, one counter100,000 hits go in and 97,412 come out. Lost updates, the invariants locks protect, and a deadlock in the snapshot code.
  6. 06One request across the networkThe handler takes 40 µs and the reader waits 800 ms. Where the rest goes, and what the network loses without telling anyone.
  7. 07Reasoning about costCan one machine count views for 5 million pages? Growth rates, a hidden quadratic, and an estimate that finds the real bottleneck.
  8. 08Measuring before believingp99 jumps from 4 ms to 900 ms after a release while the median stays put. Tracing it to a cause with percentiles, USE and the right profile.
  9. 09Languages and runtimesWhat the compiler and garbage collector do on hitcount’s behalf, what they charge, and whether a rewrite in another language would change anything.
  10. 10The mathematics you will actually useAverages, percentiles, sampling error, hash collisions, vectors, gradients and softmax, each worked by hand on hitcount’s own data.