Back to problems

Design Disk-Based Inventory Serving

System Design · Apple · Hard

The machine must serve inventory requests on spinning disks with no SSD and only a small RAM budget. The central challenge is that random disk seeks are expensive (~5–10 ms each), while sequential I/O is comparatively fast (~100 MB/s). The design below uses a B+‑tree with write‑ahead logging, a small page cache, and careful batching to keep the system correct, durable, and responsive. 1. Data Layout Page-oriented storage. All persistent data is organized into fixed‑size…

Checking your access…