Practice
Solution
Step 1: Understand traversal depth limit role
The depth limit caps how far the traversal explores to avoid excessive computation.Step 2: Behavior at limit
When the limit is reached, traversal stops and returns partial results found so far, not an error or restart.Final Answer:
Option A -> Option AQuick Check:
Traversal depth limit stops traversal and returns partial results [check]
Solution
Step 1: Identify ordering and durability needs
Relational DBs with row-level locking can't handle 1M writes/sec efficiently; Redis without persistence loses durability; NoSQL eventual consistency lacks ordering guarantees.Step 2: Recognize Kafka's partitioning for ordering
Kafka partitions by user session ensure ordered processing and durability at high throughput.Final Answer:
Option A -> Option AQuick Check:
Kafka partitions -> ordered, durable, high-throughput writes [check]
Solution
Step 1: Identify latency and loss tolerance requirements
Live video streaming prioritizes low latency and can tolerate some packet loss, so retransmission delays are undesirable.Step 2: Match protocol characteristics
UDP provides minimal overhead and no retransmission, fitting low latency needs. TCP guarantees delivery but adds delay due to retransmissions and congestion control.Final Answer:
Option A -> Option AQuick Check:
UDP suits low-latency, lossy streaming [check]
Solution
Step 1: Identify scaling bottleneck
Consumers handle message processing and scale with load.Step 2: Assess component impact
At 10x scale, consumers need to scale out to handle increased throughput.Final Answer:
Option B -> Option BQuick Check:
Consumers scale with load; brokers and producers less impacted [check]
Solution
Step 1: Identify role of event queue
The event queue asynchronously propagates updates to read replicas.Step 2: Trace failure impact
If the queue fails, read replicas stop receiving updates and serve stale data indefinitely.Final Answer:
Option B -> Option BQuick Check:
Queue failure causes stale reads, no automatic failover [check]
