HardDesign: E-Commerce System (Amazon)

How do you shard the orders database to support efficient queries by both user_id and order_id?

Tests your understanding of this concept.

Answer Options

AShard by order_id only
BShard by user_id; maintain a lookup table order_id → shard for direct order access
CShard by date
DDon't shard — use read replicas only

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 22+ more Design: E-Commerce System (Amazon) questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the Design: E-Commerce System (Amazon) topic (System Design Cases).

More Design: E-Commerce System (Amazon) Questions