Practice
Solution
Step 1: Trace Matching Engine behavior at step 5
When no matching sell orders exist, the buy order is added to the order book's buy side and marked as open, waiting for future matches.Step 2: Eliminate other options
The order is marked as matched and removed from the order book is wrong because no match occurred; The order is rejected due to lack of matching sell orders is wrong because orders are not rejected for no matches; The order is forwarded to the Market Data Feed before being stored is wrong because Market Data Feed only publishes after matching or order book update.Final Answer:
Option B -> Option BQuick Check:
Unmatched order -> added to order book as open [check]
Solution
Step 1: Identify the bottleneck as CPU and memory on a single DB server
Vertical scaling adds resources to the existing server to handle more load without architectural changes.Step 2: Evaluate horizontal scaling and other options
Horizontal scaling requires application changes for sharding; caching reduces reads but not CPU-bound writes; switching DB types is a different trade-off.Final Answer:
Option B -> Option BQuick Check:
Vertical scaling adds resources to one server without code changes [check]
Solution
Step 1: Role of event ingestion pipeline
This pipeline persists raw metric data for downstream alerting components.Step 2: Consequence of pipeline failure
Without persistence, threshold and anomaly detectors get incomplete or missing data, leading to missed alerts or false positives.Final Answer:
Option A -> Option AQuick Check:
Missing data -> detectors miss or misfire alerts [check]
Solution
Step 1: Evaluate persistent connection options
gRPC streaming is efficient but less supported on mobile platforms and can drain battery.Step 2: Compare WebSocket and polling
WebSocket supports bidirectional communication with reconnection and heartbeats, balancing real-time and battery use better than polling.Final Answer:
Option A -> Option AQuick Check:
WebSocket balances real-time updates and mobile constraints [check]
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]
