Practice
1. In the indexing pipeline, at step 3, the Indexer receives a batch of parsed documents. What state does the Indexer maintain immediately after processing this batch?
easy
Solution
Step 1: Trace Indexer behavior at step 3
The Indexer updates the inverted index with terms from the batch and retains batch metadata for consistency and fault tolerance.Step 2: Eliminate incorrect states
Deleting raw documents immediately risks data loss. PageRank runs after indexing, not before. Re-parsing is triggered by errors, not term frequency.Final Answer:
Option A -> Option AQuick Check:
Indexer updates index and keeps metadata for consistency [check]
Hint: Indexer updates index, keeps metadata for consistency [check]
Common Mistakes:
2. Without the distributed metadata service, what exactly breaks in the blob store's object retrieval process?
medium
Solution
Step 1: Trace retrieval dependency on metadata service
The metadata service provides object location and version info; without it, retrieval cannot resolve where to fetch data.Step 2: Eliminate other options
Stale metadata retrieval is impossible without metadata service; blocking indefinitely is unlikely as client errors occur; silent integrity failures require data access, which fails first.Final Answer:
Option B -> Option BQuick Check:
Metadata service absence causes unresolved object location errors [check]
Hint: No metadata service -> no object location resolution -> retrieval errors [check]
Common Mistakes:
3. At 10x scale, which component in a WebRTC video calling system is most likely to become the bottleneck first, and why?
hard
Solution
Step 1: Analyze component scalability at 10x load
Media Servers scale with CPU but can be horizontally scaled; STUN/TURN scale well with stateless UDP; clients are outside system control.Step 2: Identify Signaling Server bottleneck
Signaling Servers hold stateful WebSocket connections per user, making sharding and scaling challenging.Final Answer:
Option B -> Option BQuick Check:
Stateful WebSocket connections limit Signaling Server horizontal scaling [check]
Hint: Stateful WebSocket limits Signaling Server scaling first [check]
Common Mistakes:
4. At 10x current scale, which component in TikTok's architecture is most likely to fail first and why?
hard
Solution
Step 1: Analyze stateful connection scaling
WebSocket servers (D) hold state per connection; scaling requires complex connection migration or sticky sessions.Step 2: Compare other bottlenecks
Relational DB (A) can be sharded; transcoding (B) parallelizes; Feed Ranking (C) uses caching and sharding.Step 3: Identify first failure point
WebSocket servers hit connection limits first due to stateful nature and limited horizontal scaling.Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket servers bottleneck first due to connection affinity [check]
Hint: Stateful WebSocket servers limit horizontal scaling first [OK]
Common Mistakes:
5. At 10x scale, which Elasticsearch component is most likely to become the bottleneck first, and why?
hard
Solution
Step 1: Analyze scaling impact on Coordinating Node
Coordinating Nodes merge and sort results from all shards; with 10x shards, merging overhead grows significantly.Step 2: Compare other components
Master Node scales with cluster state but less impacted than query merging; Data Nodes handle replication but network can be scaled; Ingest Nodes can be scaled horizontally.Final Answer:
Option D -> Option DQuick Check:
Coordinating Node merging overhead grows fastest at scale [check]
Hint: Coordinating Node merges explode with shard count increase [check]
Common Mistakes:
