Practice
1. In the timeline generation flow, at step 4 the Delivery Worker reads from Kafka and checks the follower's timeline cache TTL. What happens if the cache TTL has expired for a follower at this step?
easy
Solution
Step 1: Understand Delivery Worker cache TTL check
If TTL expired, the cached timeline is stale and must be rebuilt to ensure fresh data.Step 2: Evaluate actions on expired TTL
Skipping (A) loses data; direct DB write (C) bypasses cache rebuild; retrying cache read (D) causes blocking and delays.Final Answer:
Option A -> Option AQuick Check:
Expired TTL triggers timeline rebuild to maintain freshness [check]
Hint: Expired cache TTL triggers timeline rebuild [check]
Common Mistakes:
2. In an Elasticsearch query flow, at Step 4 the Coordinating Node receives partial results from all shards. What does the Coordinating Node do at this step before returning the final response?
easy
Solution
Step 1: Understand Coordinating Node role at Step 4
The Coordinating Node collects partial results from primary and replica shards and merges them.Step 2: Eliminate incorrect actions
Master Node does not aggregate query results; caching is handled elsewhere; querying replicas again is unnecessary for consistency at this stage.Final Answer:
Option A -> Option AQuick Check:
Coordinating Node merges and sorts shard results [check]
Hint: Coordinating Node merges shard results before response [check]
Common Mistakes:
3. In a system where a cache is checked before querying the database, at Step 3 the Cache Layer receives a read request. What happens if the cache misses at this step?
easy
Solution
Step 1: Trace Cache Layer behavior on miss
On a cache miss, the Cache Layer must fetch data from the Database to serve the request.Step 2: Understand why other options fail
Returning null or placeholders breaks correctness; retrying cache reads wastes time without new data.Final Answer:
Option B -> Option BQuick Check:
Cache miss triggers DB fetch before responding [check]
Hint: Cache miss -> fetch from DB before reply [check]
Common Mistakes:
4. If the artifact registry becomes unavailable during deployment, what is the most likely failure mode in the CI/CD pipeline?
medium
Solution
Step 1: Trace deployment behavior on artifact registry unavailability
Deployment cannot validate or fetch artifacts, so it aborts and triggers rollback to maintain safety.Step 2: Eliminate other failure modes
Proceeding with cached or skipping validation risks corrupted deployments; blocking indefinitely causes pipeline stalls but rollback is preferred.Final Answer:
Option B -> Option BQuick Check:
Unavailable registry -> deployment aborts and triggers rollback [check]
Hint: No artifact registry -> abort deployment, rollback triggered [check]
Common Mistakes:
5. If the prefix hash map component fails and becomes unavailable, what is the immediate impact on the autocomplete system's behavior?
medium
Solution
Step 1: Understand component roles
The prefix hash map is an optimization for O(1) prefix lookups, but the Trie is the primary data structure for prefix matching.Step 2: Trace failure impact
If the prefix hash map fails, the system falls back to the Trie for prefix queries, which still works but may have slightly higher latency.Final Answer:
Option B -> Option BQuick Check:
Trie fallback ensures prefix queries continue despite prefix hash map failure [check]
Hint: Trie fallback keeps prefix search alive if prefix hash fails [check]
Common Mistakes:
