Practice
Solution
Step 1: Identify the need for high write throughput and partition tolerance
A centralized DB (A) and distributed lock (C) impose coordination and reduce availability. Message queue batching (D) adds latency and synchronous bottlenecks.Step 2: Recognize CRDT sharded counters allow concurrent increments without coordination and eventual consistency
CRDTs replicate asynchronously and merge without conflicts, fitting the scale and partition tolerance needs.Final Answer:
Option D -> Option DQuick Check:
CRDTs enable concurrent, partition-tolerant increments [check]
Solution
Step 1: Trace Step 4 response
At Step 4, Metadata Server returns block locations (metadata) to the client; client does not yet have file data.Step 2: Confirm client state
Client holds metadata (block locations) but must contact Data Nodes separately to read/write data blocks.Final Answer:
Option B -> Option BQuick Check:
Client holds metadata, not data, immediately after Step 4 [check]
Solution
Step 1: Identify ingestion requirements
High throughput (1M logs/sec) and ordering per source require a scalable, partitioned messaging system.Step 2: Evaluate Kafka's partitioning
Kafka partitions keyed by server ID ensure ordering per source and handle high throughput with durability.Final Answer:
Option D -> Option DQuick Check:
Kafka partitions keyed by source -> ordering and high throughput [check]
Solution
Step 1: Compare static vs dynamic ETA computation
Static shortest path (A) and precomputed caches (D) ignore live traffic variability, leading to inaccurate ETAs.Step 2: Evaluate heuristic and dynamic approaches
Heuristic ignoring traffic (C) fails in variable conditions; dynamic routing (B) adapts to live and historical data for accurate ETA.Final Answer:
Option D -> Option DQuick Check:
Dynamic routing with live traffic yields accurate ETAs in variable conditions [check]
Solution
Step 1: Analyze component scalability at 10x load
CDN edge caches (A) scale horizontally and are designed for massive read throughput. Transcoding pipeline (C) can be scaled with more workers. Upload service (D) can be scaled with load balancers and stateless servers.Step 2: Identify view count database bottleneck
View count DB is a centralized write hotspot with high contention and latency sensitivity. At 10x scale, it becomes the first bottleneck due to write amplification and consistency requirements.Final Answer:
Option B -> Option BQuick Check:
Centralized view count DB write bottleneck fails first [check]
