Practice
1. In the recommendation system request flow, at Step 4 the Embedding Service receives a user rating event from Kafka. What does it do if the user embedding is not found in the cache?
easy
Solution
Step 1: Trace Embedding Service behavior at Step 4
When cache miss occurs, the service must retrieve embedding from persistent storage to maintain consistency.Step 2: Evaluate options
Returning error (A) breaks user experience; ignoring event (C) loses data; synchronous recomputation (D) is expensive and blocks processing. Fetching from storage and updating cache (B) ensures availability and eventual consistency.Final Answer:
Option B -> Option BQuick Check:
Cache miss triggers fetch from storage and cache update [check]
Hint: Cache miss -> fetch from storage and update cache [check]
Common Mistakes:
2. A webhook delivery system must guarantee ordered delivery of events per subscriber, even under retries and failures. Which component is best suited to enforce per-subscriber ordering?
easy
Solution
Step 1: Identify ordering guarantee mechanism
Kafka partitions keyed by subscriber ID ensure all events for that subscriber go to the same partition, preserving order.Step 2: Eliminate other options
Redis cache lacks strong ordering guarantees under retries; relational DB global sequence causes contention and latency; load balancer routing alone doesn't guarantee ordering without stateful processing.Final Answer:
Option A -> Option AQuick Check:
Kafka partition key -> per-subscriber ordering guaranteed [check]
Hint: Partition by subscriber ID for ordering [check]
Common Mistakes:
3. If the BFF layer crashes and is unavailable, what is the immediate failure impact on client requests?
medium
Solution
Step 1: Understand BFF's role in request flow
BFF is the dedicated layer for client-specific aggregation; if it crashes, requests cannot be processed as usual.Step 2: Analyze fallback behavior
Microservices handle requests directly, bypassing BFF automatically is correct because some architectures allow API Gateway to fallback to direct microservice calls, though without client-specific aggregation. Clients receive stale cached data from API Gateway without error is wrong as API Gateway typically does not cache full responses. Clients' requests fail immediately as BFF is the only entry point for client-specific aggregation is incorrect because requests do not fail immediately if fallback exists. API Gateway retries requests indefinitely until BFF recovers is wrong since indefinite retries cause client timeouts.Final Answer:
Option A -> Option AQuick Check:
API Gateway fallback to microservices bypasses BFF on failure [check]
Hint: API Gateway fallback bypasses BFF if it crashes [check]
Common Mistakes:
4. If the distributed priority queue component fails and becomes unavailable, what is the immediate failure mode observed in the task scheduler?
medium
Solution
Step 1: Understand role of distributed priority queue
The queue is the source of truth for pending tasks; if unavailable, new tasks cannot be fetched.Step 2: Analyze failure impact
Without the queue, tasks submitted may be lost if not persisted elsewhere; workers cannot fetch tasks, so blocking (B) is unlikely if queue is down; cron scheduler (D) does not reschedule tasks automatically.Step 3: Evaluate silent drops (C)
Without queue durability, tasks may be lost silently if producers cannot enqueue or retries are not implemented.Final Answer:
Option B -> Option BQuick Check:
Queue failure causes silent task loss without retries [check]
Hint: Queue failure causes silent task loss without retries [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:
