Why Centralized Indexing Fails
In one line: the centralized design is the baseline every distributed decision is measured against. Two of its three limits are the familiar ones; the third — the index not fitting in RAM — is the one that actually forces distribution.
The architecture
| Process | Role |
|---|---|
| Indexing process | Takes documents as input and converts them into an inverted index, stored as a binary file |
| Query process | Interprets the binary file containing the inverted index and computes the intersection of the inverted lists for a given query to return results |
Note that the binary file is already the interface between the two processes
Even on one machine, indexing and querying communicate through a file, not shared memory. The indexer writes it; the query process reads it.
That is worth noticing because it is exactly the seam Lesson 11 cuts along. When the two processes move to separate clusters, the interface does not change — the file just moves to distributed storage instead of a local disk.
A design that was already decoupled through an artifact is much easier to pull apart than one where the two halves share state. Recognizing where a system is already separable is a genuinely useful skill.
Three limitations
| Limitation | Detail |
|---|---|
| Single point of failure | If the central node fails, the entire search service becomes unavailable |
| Server overload | High query volume or complex requests can overwhelm the single node's resources |
| Index size | As the document count grows, the index may exceed the storage and RAM capacity of a single server |
Only the third limitation is unavoidable — and that makes it the real reason
The first two have single-machine answers, at least for a while:
SPOF → add a standby with failover. Not elegant, but it works and plenty of production systems run this way.
Overload → buy a bigger machine. Vertical scaling has a ceiling but it is a high one, and Lesson 2 showed the index is only 1.8 GB/day for one tenant.
Index size has no such escape.
Efficient query processing requires keeping a large portion of the inverted index in memory. With hundreds of billions of web pages and petabytes of data, a single machine cannot store the full index in memory.
You cannot buy a machine with petabytes of RAM. There is no version of this problem that a bigger server solves, because the constraint is physical rather than economic.
That is why the honest answer to "why distribute?" is not "for availability" — it is "because the working set does not fit in one machine's memory." Availability and throughput are things you also get; memory capacity is the thing you had no choice about.
The same distinction applies elsewhere: a cache is distributed because the hot set exceeds one machine's RAM, and a blob store because the data exceeds one machine's disk. Ask which constraint is physical and which is merely expensive — the physical one is the real driver.
Search time grows with data volume — the shelf analogy
Note: search time increases with data volume. Searching a shelf of one million books takes significantly longer than searching a shelf of one hundred.
This is Lesson 2's "low latency regardless of data volume" requirement, restated as the thing that breaks.
The analogy is nearly right and worth sharpening, because the sharpened version is the design. Searching a shelf without a catalogue scales with the number of books. Searching with one scales with the number of matching entries, not the shelf size — that is what an index buys.
But even with a catalogue, one librarian has a throughput limit. Ten librarians each with a tenth of the catalogue is the distributed version, and it is exactly Lesson 8's design.
Indexing removes the linear scan; partitioning removes the single-worker bottleneck. Two different problems, two different fixes.
Commodity hardware is a requirement, not a consequence
Note: distributed systems allow the use of cost-effective commodity hardware rather than expensive mainframes.
Lesson 2 listed cost efficiency as a non-functional requirement, and this is where it pays off. The choice is between one very large expensive machine and many small cheap ones — and the requirement, plus the RAM constraint, picks many small ones.
That decision then generates most of the rest of the chapter's work. Commodity nodes fail often, so you need replication (Lesson 9) and heartbeats (Lesson 8). They are individually weak, so you need partitioning. None of that machinery would exist if a single mainframe were acceptable.
Cheap hardware is not free — you pay for it in distributed-systems complexity. It is the right trade at this scale, and it is worth saying that it is a trade.
Centralized systems are also more vulnerable to attacks and hardware bottlenecks — such as bandwidth or RAM — than distributed alternatives.
Key takeaway
A centralized system runs indexing and querying on one node, communicating through a binary index file — a seam the distributed design later cuts along. Of its three limits, SPOF and overload have single-machine workarounds; index size does not, because a petabyte-scale index cannot fit in any machine's RAM. That physical constraint, not availability, is why search is distributed.
Interview signal by level
| Level | What a strong answer sounds like |
|---|---|
| L4 | "One server is a single point of failure and can get overloaded." |
| L5 | Adds the capacity limit: "and eventually the index outgrows the machine — you need a large portion of it in memory for fast lookups, and that doesn't fit." |
| Staff+ | Ranks the three: "SPOF and overload both have single-machine answers — a standby, a bigger box. Index size doesn't: you can't buy petabytes of RAM, so that constraint is physical rather than economic, and it's the actual reason to distribute. Availability and throughput are things we also get. I'd also note the centralized design already talks through a binary index file, so indexing and querying are separable along a seam that already exists." |
Next: the distributed architecture.