Practice
1. A company needs to store large amounts of unstructured data like images and videos with metadata accessible via HTTP APIs. Which storage type best fits this use case?
easy
Solution
Step 1: Identify storage needs for unstructured data with metadata
Object storage stores data as objects with customizable metadata and supports HTTP APIs, ideal for images/videos.Step 2: Eliminate other storage types
Block storage is low-level and lacks metadata support; file storage is optimized for hierarchical file systems but less scalable for massive unstructured data; in-memory storage is volatile and unsuitable for large persistent files.Final Answer:
Option A -> Option AQuick Check:
Object storage = scalable unstructured data + metadata + HTTP [check]
Hint: Object storage = objects + metadata + HTTP access [check]
Common Mistakes:
2. In the message delivery trace, at Step 4 the Delivery Worker checks Bob's presence TTL in the presence service cache. What happens if Bob's presence TTL has expired at this step?
easy
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- Bob's presence TTL
If Bob's presence TTL expired, the system treats Bob as offline but still attempts delivery to his last known server to avoid message loss.Step 2: Eliminate other options
Immediate delivery marking is incorrect as message may not be delivered; queuing for offline storage happens later; indefinite retries cause blocking; forwarding to last known server is the fallback.Final Answer:
Option C -> Option CQuick Check:
Delivery Worker forwards to last known server if presence expired [check]
Hint: Expired presence TTL -> fallback to last known server delivery [check]
Common Mistakes:
3. For timeline generation at scale, which architecture better handles users with millions of followers and why?
medium
Solution
Step 1: Analyze push vs pull trade-offs
Push fan-out is efficient for low-follower users but expensive for celebrities; pull is costly on read latency.Step 2: Evaluate hybrid approach
Hybrid uses push for most users, pull for celebrities, balancing latency and write amplification.Step 3: Eliminate other options
Pure push (A) causes huge write amplification; pure pull (C) causes high read latency; global sorted set (D) is hard to scale and update asynchronously.Final Answer:
Option C -> Option CQuick Check:
Hybrid push-pull balances write cost and read latency [check]
Hint: Hybrid push-pull fits follower count extremes [check]
Common Mistakes:
4. At 10x scale, which component in the ML data infrastructure is most likely to become the bottleneck first, and why?
hard
Solution
Step 1: Analyze scaling challenges per component
Feature store caches can be sharded; batch clusters scale horizontally; metadata registries are smaller and less frequently accessed.Step 2: Identify Kafka bottleneck
Kafka throughput depends on partition count, which is hard to increase dynamically. Rebalancing partitions at scale causes downtime and latency spikes, making Kafka ingestion the first bottleneck.Final Answer:
Option D -> Option DQuick Check:
Kafka partition limits and rebalancing cause ingestion bottlenecks [check]
Hint: Kafka partitions limit throughput; rebalancing causes downtime [check]
Common Mistakes:
5. At 10x scale in user requests and live traffic updates, which component is most likely to fail first and why?
hard
Solution
Step 1: Analyze scaling bottlenecks
Road Graph DB (A) can be sharded; ingestion pipeline (C) can scale horizontally; client rendering (D) is local and less critical.Step 2: Identify Routing Engine CPU bottleneck
Routing Engine performs complex shortest path computations per request; 10x load causes CPU saturation and latency spikes, failing first.Final Answer:
Option C -> Option CQuick Check:
Routing Engine CPU-bound under 10x load causes first failure [check]
Hint: Routing Engine CPU saturates first under 10x load [check]
Common Mistakes:
