All Questions
Vector Search easy

You run semantic search over one public corpus of 300 million web pages. Every query searches the whole corpus, and traffic is fairly uniform. How should you shard the index?

  1. A Shard by the topic of each page so that queries only need to visit the single most relevant shard.
  2. B Shard by hash of document ID to spread data and load evenly, then merge top-k from all shards.
  3. C Shard by the date of each page so that recent content sits on the fastest nodes in the cluster.
  4. D Shard by the user who issued the query so each user's searches always land on the same node.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions