Layer 3 · Go deeper · 8 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
At 5 million products, what does each dedicated engine need?
Bazaar at 50 million products with hybrid search: how big per copy?
Bazaar logs 1 TB a day. How many shards for a hot week?
Build-up · 6 steps
Five questions from requirements to an engine
Each question rules out a family. Workload first, then whether you need a new system, then who runs it, then whether one machine holds the index.
Step 1 of 6
Logs or events?
Workload comes first. Append-only logs, GBs to TBs a day, want time-based indices: Elasticsearch or OpenSearch data streams, or Loki’s label-only index. Relevance hardly matters.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Bazaar has 5 million products. Shoppers want facets, typo tolerance and merchandised results. Which engine do you pick?”
Assume the roadmap reaches 50 million products and vector search within two years.
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“A small team with a few million products wants typo-tolerant search with facets, and nobody can run a cluster. Where should search run?”
Assume 2 KB records and an average of 100 queries a second.
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“Your company allows only OSI-approved licences. A teammate says that rules out Elasticsearch. Does it?”
Search runs behind your own app. You don’t resell it or ship the engine.
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Bazaar’s stock and prices change far more often than its titles. Where do those hot fields live in your search design?”
Your move. Pick an approach: