Practice
1. A distributed cache system must evenly distribute keys across nodes and gracefully handle node failures without massive key remapping. Which component or technique best addresses this requirement?
easy
Solution
Step 1: Understand key distribution needs
Simple modulo hashing (Using a simple modulo hash function on node count to assign keys) causes massive remapping when nodes change, failing graceful scaling.Step 2: Evaluate consistent hashing benefits
Consistent hashing with virtual nodes (Implementing consistent hashing with virtual nodes) minimizes remapping and balances load even with node failures.Final Answer:
Option A -> Option AQuick Check:
Consistent hashing with virtual nodes -> minimal key remapping on node changes [check]
Hint: Consistent hashing + virtual nodes minimize remap on node changes [OK]
Common Mistakes:
2. In a gRPC streaming call, at step 4 the server-side stream handler checks the client connection status before sending a message. What happens if the client has disconnected at this step?
easy
Solution
Step 1: Understand server stream handler behavior
When client disconnects, server detects cancellation via context and stops streaming.Step 2: Trace server reaction at step 4
Server cancels the stream and frees resources immediately; it does not buffer or retry indefinitely.Final Answer:
Option A -> Option AQuick Check:
Client disconnect -> server cancels stream and frees resources [check]
Hint: Disconnected client -> server cancels stream immediately [check]
Common Mistakes:
3. In a post-mortem process, at Step 4 the Root Cause Analysis (RCA) team reviews the timeline and identifies contributing factors. What is the state of the RCA team's findings at this step?
easy
Solution
Step 1: Trace RCA team's role at Step 4
At this stage, the team analyzes the timeline to identify contributing factors but has not yet prioritized or assigned action items.Step 2: Eliminate incorrect states
They have finalized the action items and assigned owners is premature; action items come after prioritization. They have blamed specific individuals for the failure violates blameless culture. They have ignored system logs and rely only on anecdotal evidence ignores critical data sources.Final Answer:
Option A -> Option AQuick Check:
RCA identifies factors before prioritizing or assigning actions [check]
Hint: RCA finds causes first, acts later [check]
Common Mistakes:
4. If the sliding window counter's timestamp cleanup process fails, what is the most likely failure observed in rate limiting?
medium
Solution
Step 1: Understand sliding window cleanup role
Cleanup removes timestamps outside the window; failure causes stale timestamps to accumulate.Step 2: Accumulated stale timestamps inflate request counts, causing the rate limiter to block legitimate requests indefinitely
This leads to false positives in rate limiting, denying service unnecessarily.Final Answer:
Option C -> Option CQuick Check:
Failed cleanup -> stale timestamps inflate counts -> requests blocked indefinitely [check]
Hint: No cleanup means stale timestamps block requests falsely [check]
Common Mistakes:
5. For a system requiring cost optimization with infrequent data access but occasional retrieval within hours, which storage architecture is preferable?
medium
Solution
Step 1: Analyze access and cost requirements
Data is infrequently accessed but needs retrieval within hours, so cold storage alone is too slow.Step 2: Evaluate tiering benefits
Warm storage offers moderate cost and latency; cold storage reduces cost further. Tiering balances cost and retrieval time.Final Answer:
Option A -> Option AQuick Check:
Warm + cold tiering balances cost and retrieval latency [check]
Hint: Warm + cold tiering balances cost and latency [check]
Common Mistakes:
