The Computing Series

Group 1 — Mathematical Constraints

These laws make specific, falsifiable mathematical claims. They cannot be circumvented. Designing against them is not bold — it is wrong.


L1 — Amdahl’s Law

The Law: The maximum speedup from parallelising a task is limited by the portion that cannot be parallelised. If 20% of a task is sequential (cannot be parallelised), the maximum speedup is 5× regardless of how many processors you add.

The formula: Maximum speedup = 1 / (s + (1-s)/n), where s is the sequential fraction and n is the number of parallel workers.

The engineering implication: Before investing in horizontal scaling, identify the sequential portions of the critical path. A database query that takes 90% of request time is a sequential bottleneck — adding more application servers will produce diminishing returns until the database is addressed.

Where engineers misapply it: Adding application servers when the database is the bottleneck. Adding workers to a pipeline where the shuffle step is sequential. Parallelising a task that is 50% sequential and expecting more than 2× speedup.


L2 — Moore’s Law (and its limits)

The Law: The number of transistors on a microchip doubles approximately every two years. Historically, this produced roughly 2× compute performance per dollar every 18–24 months.

The current state: Single-core performance improvements have largely stalled since ~2010. The doubling now manifests as more cores and specialised hardware (GPUs, TPUs) rather than faster single-threaded execution.

The engineering implication: Algorithms that require good single-threaded performance cannot rely on hardware to improve them over time. Systems designed in 2015 that were “fast enough” may still be “fast enough” in 2025 because single-core performance has not improved dramatically. Architecture decisions that could be deferred five years ago (because hardware would solve them) cannot be deferred today.

Where engineers misapply it: Assuming that performance problems will be solved by next-generation hardware. This was partially true from 1970–2005; it is largely false for single-threaded workloads today.


L3 — CAP Theorem

The Law: A distributed system cannot simultaneously guarantee Consistency (all nodes see the same data at the same time), Availability (every request receives a response), and Partition Tolerance (the system continues operating when the network between nodes is disrupted). During a partition, you must choose between consistency and availability.

The critical qualifier: The choice between consistency and availability only arises during a partition. In the absence of a partition, you can have both. Most of the time, there is no partition. Design for partitions; operate normally otherwise.

The engineering implication: Every distributed data store makes a consistency-availability tradeoff. Understand which choice your data store has made. Use it appropriately: strong consistency for financial data; eventual consistency for social content.

Where engineers misapply it: Treating CAP as a permanent choice (“we chose availability so we are always eventually consistent”) rather than a partition-time choice. Using CAP to justify poor consistency in systems that should be consistent.


L4 — Little’s Law

The Law: In a stable system: average throughput = average arrival rate × average latency. Or equivalently: average number of items in the system = arrival rate × average time in the system.

The formula: L = λW, where L is average number of requests in the system, λ is the average arrival rate, and W is the average time spent in the system.

The engineering implication: If latency increases and throughput must remain constant, the number of concurrent requests in the system must increase — which requires more resources (threads, connections, memory). This is why latency spikes cause resource exhaustion: the system is now holding more concurrent requests than it was designed for.

Where engineers misapply it: Ignoring the consequence of latency increase on resource consumption. A latency spike from 100ms to 1000ms at constant throughput requires 10× the concurrent capacity. Systems that do not have this capacity will fail.


L5 — Metcalfe’s Law

The Law: The value of a communications network is proportional to the square of the number of connected users.

The engineering implication: Network effects are superlinear. A messaging platform with 2× more users is worth roughly 4× more to each user, not 2× more. This creates winner-take-all dynamics in markets with strong network effects. The first mover advantage in a network-effects business is structural, not incidental.

Where engineers apply it: Designing for network effects (Chapter 7 of Book 7). Justifying infrastructure investment to reach the “tipping point” where the network effect becomes self-sustaining.


Read in the book →