Practice
1. A system needs to quickly check membership of millions of items with minimal memory and can tolerate some false positives but no false negatives. Which component best handles this requirement?
easy
Solution
Step 1: Identify membership check requirements
The system requires fast membership queries with minimal memory and can tolerate false positives but not false negatives.Step 2: Match component capabilities
Bloom filters use multiple hash functions and a bit array to provide space-efficient membership checks with false positives but no false negatives, fitting the scenario.Final Answer:
Option D -> Option DQuick Check:
Bloom filter trades memory for false positives, no false negatives [check]
Hint: Bloom filters trade memory for false positives [check]
Common Mistakes:
2. In the request flow of a video call setup, at step 5 the Signaling Server receives an SDP offer from Alice and forwards it to Bob. What state does the Signaling Server maintain immediately after forwarding the offer?
easy
Solution
Step 1: Trace Signaling Server behavior at step 5
The server forwards Alice's SDP offer to Bob and stores it to correlate with Bob's answer.Step 2: Understand session state management
Session is not established until Bob's SDP answer arrives; the offer must be retained temporarily.Final Answer:
Option A -> Option AQuick Check:
Signaling Server stores offer awaiting answer before session established [check]
Hint: Signaling stores offer until answer arrives, then session established [check]
Common Mistakes:
3. In a system using TCP for file transfer, at step 4 the TCP sender retransmits a packet after a timeout. What is the state of the sender's congestion window at this step?
easy
Solution
Step 1: Understand TCP congestion control on timeout
When a retransmission timeout occurs, TCP interprets it as network congestion and reduces the congestion window to the slow-start threshold.Step 2: Confirm congestion window behavior
The congestion window is reset to a lower value to reduce sending rate, avoiding further congestion.Final Answer:
Option D -> Option DQuick Check:
Timeout triggers congestion window reduction to slow-start threshold [check]
Hint: Timeout -> congestion window reset to slow-start threshold [check]
Common Mistakes:
4. A financial system requires strict ACID compliance for transactions involving multiple accounts, ensuring atomicity and consistency. Which component is most appropriate to handle these transactional guarantees?
easy
Solution
Step 1: Identify transactional requirements
The scenario demands strict ACID properties, especially atomicity and consistency across multiple accounts.Step 2: Match component capabilities
Relational databases provide multi-statement transactions with ACID guarantees, unlike NoSQL stores or caches which sacrifice consistency or durability.Final Answer:
Option D -> Option DQuick Check:
Relational DBs ensure ACID transactions for multi-account updates [check]
Hint: ACID transactions require relational DBs, not eventual consistency [check]
Common Mistakes:
5. At 10x scale, which component is most likely to fail first and why in Slack's real-time delivery system?
hard
Solution
Step 1: Identify stateful bottlenecks at scale
Chat servers hold WebSocket connections in memory, which are stateful and tied to specific servers, limiting horizontal scaling.Step 2: Compare other components
Databases can be sharded; Kafka scales with partitions; presence service caches can be distributed; chat servers' stateful connections are the hardest to shard.Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket connections -> chat servers bottleneck at 10x scale [check]
Hint: Stateful WebSocket binds chat servers -> first bottleneck [check]
Common Mistakes:
