Practice
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]
Solution
Step 1: Analyze log storage requirements
Logs are write-once, large volume, and require fast analytical queries.Step 2: Evaluate columnar data warehouse
Columnar stores optimize for append-only writes and fast scans, reducing cost and improving query speed.Final Answer:
Option C -> Option CQuick Check:
Columnar warehouse -> optimized for append-only and analytics [check]
Solution
Step 1: Identify DAU Estimator role
DAU Estimator provides daily active user count critical for bandwidth calculations as bandwidth depends on total active users.Step 2: Eliminate other options
The system cannot estimate peak QPS, causing under-provisioning of servers is incorrect because peak QPS depends on instantaneous requests, not just DAU; Storage estimation becomes inaccurate because DAU is a key multiplier for daily data volume is partially true but storage depends more on total objects, not DAU alone; User authentication fails because DAU tracks active sessions is unrelated to authentication.Final Answer:
Option A -> Option AQuick Check:
Bandwidth depends directly on DAU for total data transfer [check]
Solution
Step 1: Understand queue's role in message deduplication and buffering
Queues often provide deduplication and buffering to ensure exactly-once or at-least-once delivery.Step 2: Consequence of removing the queue
Without the queue, messages may be duplicated due to lack of deduplication and buffering mechanisms.Final Answer:
Option B -> Option BQuick Check:
Removing queue causes message duplication due to missing deduplication [check]
Solution
Step 1: Role of transaction log (WAL)
The WAL records all changes before commit to enable redo/undo during crash recovery.Step 2: Consequence of missing WAL
Without WAL, committed transactions might not be replayed, causing partial or lost updates and inconsistency.Final Answer:
Option A -> Option AQuick Check:
Missing WAL -> lost committed transactions, inconsistent state [check]
