Practice
Solution
Step 1: Understand Delivery Worker role at step 4
Delivery Worker uses Redis presence TTL to detect if recipient is online. If TTL expired, recipient is offline.Step 2: Determine correct offline message handling
Marking message delivered immediately (A) is incorrect because recipient hasn't received it. Deleting message (C) causes data loss. Retrying indefinitely (D) blocks processing. Correct behavior is to queue for offline delivery and mark pending (B).Final Answer:
Option A -> Option AQuick Check:
Expired TTL -> queue offline delivery, mark pending [check]
Solution
Step 1: Identify chunking responsibility
The client-side chunking module splits files into chunks and computes hashes to detect which chunks have changed, enabling delta uploads.Step 2: Eliminate other components
The server-side storage engine stores chunks but does not perform delta detection; network layer compresses data but doesn't detect changes; metadata DB manages permissions, unrelated to chunk detection.Final Answer:
Option B -> Option BQuick Check:
Client chunking detects changed parts before upload [check]
Solution
Step 1: Identify GeoDNS role
GeoDNS resolves DNS queries differently based on the client's geographic location, enabling routing to the nearest data center.Step 2: Eliminate other options
A centralized load balancer (A) is a single point and doesn't handle geo-based DNS resolution. CDN (C) caches content but doesn't route DNS queries. Application-level proxy (D) routes after DNS resolution, not at DNS level.Final Answer:
Option A -> Option AQuick Check:
GeoDNS routes based on client location via DNS resolution [check]
Solution
Step 1: Analyze bandwidth and latency constraints
Mobile apps benefit from minimizing data transfer and round-trips due to limited bandwidth and latency.Step 2: Compare REST and GraphQL trade-offs
REST multiple endpoints cause multiple round-trips; single endpoint REST over-fetches; GraphQL queries exactly needed fields in one request.Final Answer:
Option D -> Option DQuick Check:
GraphQL reduces over-fetching and round-trips for mobile [check]
Solution
Step 1: Identify stateful session management bottleneck
Stateful sessions bind users to servers, preventing easy horizontal scaling and causing failure under 10x load.Step 2: Exclude other components that scale better or have mitigation
Databases can shard; load balancers scale horizontally; caches can be invalidated or refreshed.Final Answer:
Option D -> Option DQuick Check:
Stateful sessions limit scaling -> first failure point [check]
