Chapter 2.4
Power Laws in Search
Query distribution follows a power law: a tiny fraction of queries generate most traffic.
The Power Law Distribution
This curve (Zipf's Law) represents one of the most fundamental truths in search. The "Head" (red) represents safe, frequent queries. The "Tail" (green) is where the complexityand often the high-value intentlives.
Adaptive Optimization Strategy
We can't treat all queries the same. In code, we apply different time-to-live (TTL) and processing depths based on query frequency.
Traffic Distribution
A visual breakdown of how a small percentage of distinct queries accounts for the massive majority of total search volume.
% of Total Traffic
Head Queries
1% of unique
30%
of traffic
Torso Queries
10% of unique
30%
of traffic
Tail Queries
89% of unique
40%
of traffic
The Scalability Paradox
Head Queries = CPU Problem
High QPS (Queries Per Second). Serving "iphone" 10,000 times/sec requires massive compute if not cached.
- Cache Hit Rate99.9%
- Latency Target< 10ms
Tail Queries = IO Problem
Huge Index. Serving "1994 toyota corolla alternator bolt size" requires scanning massive indices on disk.
- Cache Hit Rate< 5%
- Latency Target< 200ms
Strategies by Segment
Head Strategy
- • Manual tuning & curation
- • Heavy caching (5 min TTL)
- • Dedicated A/B testing
- • Query-specific rules
Torso Strategy
- • Category-level rules
- • Template matching
- • Click models (aggregated)
- • Facet optimization
Tail Strategy
- • Semantic/vector search
- • Query relaxation
- • Fallback strategies
- • LLM rewriting
Key Takeaways
Power Law
Search follows a power law (Zipf's Law). A few queries (Head) drive massive volume.
Head Strategy
Memory-bound (CPU). Optimize with aggressive caching and manual curation.
Tail Strategy
IO-bound (Disk). Optimize with semantic search and query expansion (recall).
Scalability Paradox
You can't use the same architecture for both. Adaptive pipelines are required.