Practice
1. In a CQRS system, a write request updates the primary database at Step 3. At Step 5, the read replica receives an update event. What is the state of the read replica at Step 6 immediately after receiving the event but before applying it?
easy
Solution
Step 1: Trace event arrival at read replica
Upon receiving the update event, the read replica has not yet applied it, so data is stale.Step 2: Understand read replica behavior
Read replicas serve stale data until the event is processed; they do not reject or queue reads.Final Answer:
Option D -> Option DQuick Check:
Read replicas serve stale data until update applied [check]
Hint: Read replicas lag briefly, serve stale data until updated [check]
Common Mistakes:
2. In a system using Long Polling for server-to-client updates, at step 3 the client receives a response and immediately sends a new request. What is the client's state at step 4 before the server responds?
easy
Solution
Step 1: Trace Long Polling request lifecycle
In Long Polling, the client sends a request and waits for the server to respond. Upon receiving the response, the client immediately sends a new request.Step 2: Determine client state at step 4
At step 4, the previous connection is closed, and the client has an open new HTTP request waiting for the server's next response.Final Answer:
Option D -> Option DQuick Check:
Long Polling client sends new request immediately after response [check]
Hint: Long Polling: response -> new request sent immediately [check]
Common Mistakes:
3. At 10x transaction volume, which component of a relational database system is most likely to become the bottleneck first, and why?
hard
Solution
Step 1: Identify bottleneck under high concurrency
Lock manager handles concurrency control; at 10x load, lock contention increases exponentially.Step 2: Compare other components
Query optimizer scales well with caching; storage and network scale with hardware upgrades; lock manager contention is harder to mitigate.Final Answer:
Option C -> Option CQuick Check:
Lock manager contention -> first bottleneck at high transaction scale [check]
Hint: Lock manager contention grows fastest at scale [check]
Common Mistakes:
4. At 10x scale, which component in the API Gateway + BFF architecture is most likely to become the first bottleneck, and why?
hard
Solution
Step 1: Identify component workload at scale
BFF performs CPU-intensive aggregation and transformation per request, which grows linearly with client requests.Step 2: Compare other components
Microservices database, due to increased write contention is less likely first bottleneck as databases can be scaled horizontally or partitioned. API Gateway, because it must maintain stateful WebSocket connections for all clients is incorrect because API Gateway is typically stateless or uses connection offloading. Load balancer, due to limited connection handling capacity is wrong since load balancers scale well horizontally.Final Answer:
Option C -> Option CQuick Check:
BFF CPU-bound aggregation limits scale before other components [check]
Hint: BFF CPU-bound aggregation limits scale before others [check]
Common Mistakes:
5. At 10x scale, which component in a BM25-based search ranking system is most likely to become the bottleneck first and why?
hard
Solution
Step 1: Analyze scaling impact on components
Query parser scales well with parallelism; DF updater can be sharded; ranking scales with candidate pruning.Step 2: Identify inverted index storage bottleneck
Inverted index storage faces increased random disk seeks as index grows, causing latency spikes; disk I/O is harder to scale linearly than CPU or memory.Final Answer:
Option B -> Option BQuick Check:
Disk I/O random seeks in inverted index storage bottleneck first [check]
Hint: Disk random seeks in inverted index grow fastest at scale [check]
Common Mistakes:
