The chapters — one page each
- 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.
- 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.
- 03The machine underneathThe same code, 2,500 times more pages: why the answer depends on caches and layout more than on the sort.
- 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.
- 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.
- 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.
- 07Reasoning about costCan one machine count views for 5 million pages? Growth rates, a hidden quadratic, and an estimate that finds the real bottleneck.
- 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.
- 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.
- 10The mathematics you will actually useAverages, percentiles, sampling error, hash collisions, vectors, gradients and softmax, each worked by hand on hitcount’s own data.