Practice
Solution
Step 1: Identify driver assignment requirements
Real-time, low-latency matching requires fast spatial queries and event-driven updates.Step 2: Evaluate component suitability
Relational DBs with spatial indexes (A) are too slow for high write/read concurrency; batch jobs (C) introduce unacceptable delay; client-side filtering (D) is inefficient and inconsistent.Final Answer:
Option D -> Option DQuick Check:
Distributed in-memory geospatial index with pub/sub -> real-time, scalable driver assignment [check]
Solution
Step 1: Identify priority and scale requirements
A relational DB (A) struggles with high write throughput and priority ordering at scale; simple FIFO queues (C) lack priority support; cron jobs (D) do not coordinate distributed execution or priority.Step 2: Evaluate distributed priority queue
A distributed priority queue with partitioned shards (B) can scale horizontally, maintain priority ordering per shard, and support exactly-once execution semantics.Final Answer:
Option A -> Option AQuick Check:
Distributed priority queue shards scale and preserve ordering [check]
Solution
Step 1: Trace BGP route withdrawal effect
When a route is withdrawn, routers remove it from their routing table and send ICMP unreachable messages to notify clients that the destination is unreachable.Step 2: Eliminate incorrect options
Routers do not buffer packets (C), nor do they drop traffic silently (A). Marking routes unreachable and selecting alternatives (B) happens but only after receiving withdrawal; immediate effect is ICMP signaling.Final Answer:
Option C -> Option CQuick Check:
Route withdrawal triggers ICMP unreachable notifications [check]
Solution
Step 1: Analyze read/write pattern for restaurant discovery
High read volume with frequent writes requires low-latency reads and near-real-time updates.Step 2: Evaluate architectures
Relational DB (A) can't handle query volume with low latency; batch ETL (C) is too stale; client filtering (D) is impractical for large data.Final Answer:
Option B -> Option BQuick Check:
Distributed cache with async sync -> low latency + fresh data [check]
Solution
Step 1: Trace failure impact of message queue outage
The queue decouples upload and transcoding. Without it, upload service cannot enqueue transcoding jobs. Uploads succeed but transcoding workers receive no tasks, so no processed videos are generated. Blocking upload (B) is incorrect because upload is asynchronous. Duplicate transcoding (A) is unrelated. View count errors (D) happen downstream, not due to queue failure.Step 2: Confirm exact failure mode
Uploads accepted but stuck before transcoding is the precise failure.Final Answer:
Option A -> Option AQuick Check:
Queue failure causes transcoding jobs to be lost, no processed videos [check]
