Practice
Solution
Step 1: Identify burst tolerance and smooth rate enforcement
Fixed window counters reset abruptly at minute boundaries, causing spikes. Token and leaky buckets enforce steady rates but may not track exact recent usage.Step 2: Sliding window counters track requests continuously over the last 60 seconds, allowing bursts without sudden resets
Sliding window counters provide smoother rate limiting by considering recent activity, avoiding boundary effects.Final Answer:
Option B -> Option BQuick Check:
Sliding window smooths rate limits over time, avoiding fixed window spikes [check]
Solution
Step 1: Identify the role of API Gateway
The API Gateway acts as the first entry point and can block abusive traffic before it reaches internal services or databases.Step 2: Evaluate other layers
Database-level rate limiting is too late and risks overload; service-level limits are per-service and don't prevent global abuse; client-side limits are unreliable as clients can be malicious.Final Answer:
Option C -> Option CQuick Check:
API Gateway blocks abusive requests early [check]
Solution
Step 1: Understand BM25 reliance on DF
BM25 scoring depends on accurate document frequency to weigh term rarity; stale DF skews scores.Step 2: Trace impact of stale DF at Ranking Component
Ranking uses stale DF directly, leading to inaccurate relevance scores and suboptimal document ordering; no automatic fallback or query rejection occurs.Final Answer:
Option D -> Option DQuick Check:
Stale DF causes inaccurate BM25 scores and ranking errors [check]
Solution
Step 1: Trace Ticket Server allocation at Step 3
The Ticket Server allocates a block of IDs (a range) to the client to reduce coordination.Step 2: Understand client state post-allocation
Client holds this reserved ID block locally, enabling fast local ID generation without further immediate server requests.Final Answer:
Option A -> Option AQuick Check:
Client holds ID block -> local allocation without blocking [check]
Solution
Step 1: Understand Market Data Feed failure impact
When Market Data Feed crashes, it stops pushing updates; clients detect connection loss and receive error events triggering reconnection.Step 2: Eliminate other options
Clients receive stale prices indefinitely with no indication of failure is wrong because clients detect connection loss; Clients receive partial updates but with delayed timestamps causing confusion is wrong because partial updates don't occur without feed; Clients continue receiving cached data from the Matching Engine without updates is wrong because Matching Engine doesn't serve cached market data.Final Answer:
Option C -> Option CQuick Check:
Feed crash -> clients get error + reconnect attempts [check]
