Practice
1. A monitoring system must detect when a metric exceeds a fixed limit for 5 consecutive minutes and trigger an alert. Which component is best suited to implement this logic?
easy
Solution
Step 1: Identify alerting logic type
The requirement is to detect when a metric exceeds a fixed limit for a duration, which is a classic threshold alert scenario.Step 2: Match component to logic
Threshold-based alerting components are designed to evaluate metrics against static limits over time windows, unlike anomaly detection which looks for statistical deviations.Final Answer:
Option A -> Option AQuick Check:
Threshold alerting matches fixed limit checks over time [check]
Hint: Fixed limit over time -> threshold alert component [check]
Common Mistakes:
2. In a code repository system, which component is best suited to efficiently store and retrieve file diffs to minimize storage space while allowing fast access for merges?
easy
Solution
Step 1: Identify storage needs for diffs
Storing diffs efficiently requires deduplication and immutability; content-addressable storage (CAS) stores objects by their hash, enabling reuse of identical content and saving space.Step 2: Evaluate other options
Relational DB with BLOBs stores full versions, wasting space; Redis is volatile and not durable for persistent storage; file system copies waste space and slow for merges.Final Answer:
Option C -> Option CQuick Check:
CAS stores objects by hash -> deduplication and fast retrieval [check]
Hint: Content-addressable storage deduplicates by hash [check]
Common Mistakes:
3. In the trace propagation flow, at step 4 the downstream Service B receives an HTTP request with trace headers. What does Service B's instrumentation do at this step?
easy
Solution
Step 1: Understand instrumentation behavior on incoming requests
At step 4, Service B's instrumentation extracts the trace context from incoming HTTP headers and starts a new span as a child of the parent span to maintain trace continuity.Step 2: Eliminate incorrect behaviors
Starting a new root trace breaks trace linkage. Sending data directly to storage without processing is not the instrumentation's role. Dropping headers loses trace continuity.Final Answer:
Option D -> Option DQuick Check:
Service B extracts context and starts child span [check]
Hint: Extract incoming context, start child span to continue trace [OK]
Common Mistakes:
4. You must design a notification system that requires immediate user feedback on success or failure of each notification. Which communication approach is best suited for this requirement?
medium
Solution
Step 1: Identify requirement for immediate feedback
Immediate success/failure feedback requires synchronous communication to confirm delivery.Step 2: Evaluate synchronous HTTP calls
Synchronous HTTP with timeouts and retries provides immediate response and error handling.Final Answer:
Option A -> Option AQuick Check:
Synchronous calls provide immediate feedback required by the system [check]
Hint: Immediate feedback needs synchronous calls with timeouts [check]
Common Mistakes:
5. At 10x scale, which component in a cache stampede prevention system is most likely to fail first, and why?
hard
Solution
Step 1: Identify bottlenecks at 10x scale
Backend and cache scale horizontally; load balancers scale well.Step 2: Analyze distributed lock service
Lock service faces increased contention and coordination overhead, causing latency and failures.Final Answer:
Option C -> Option CQuick Check:
Distributed lock service bottlenecks first due to coordination overhead [check]
Hint: Lock service bottlenecks first due to exponential coordination overhead [OK]
Common Mistakes:
