Bird
0
0

You want to design a scalable delivery agent assignment system for a city with thousands of agents and orders per minute. Which approach best improves scalability?

hard📝 Trade-off Q15 of 15
LLD - Design — Food Delivery System

You want to design a scalable delivery agent assignment system for a city with thousands of agents and orders per minute. Which approach best improves scalability?

AUse a centralized server to check all agents for every order
BPartition the city into zones and assign agents within zones only
CAssign agents randomly without considering location
DAssign the oldest registered agent to every order
Step-by-Step Solution
Solution:
  1. Step 1: Understand scalability challenges

    Checking all agents for every order is slow and resource-heavy at large scale.
  2. Step 2: Choose a partitioning strategy

    Dividing the city into zones limits search space, making assignment faster and scalable.
  3. Step 3: Evaluate other options

    Random or oldest agent assignment ignores location, causing delays and inefficiency.
  4. Final Answer:

    Partition the city into zones and assign agents within zones only -> Option B
  5. Quick Check:

    Zone partitioning = scalable assignment [OK]
Quick Trick: Divide city into zones to limit search scope [OK]
Common Mistakes:
  • Using centralized server causing bottlenecks
  • Ignoring agent location in assignment
  • Assigning agents randomly or by registration time

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes