Practice
Solution
Step 1: Trace Metadata Service validation at Step 4
The Metadata Service performs synchronous validation; failure causes immediate rejection to prevent invalid data.Step 2: Eliminate other options
Writing without metadata update breaks consistency, async retry delays error feedback, and storing invalid data risks corruption.Final Answer:
Option A -> Option AQuick Check:
Metadata validation failure causes immediate client error [check]
Solution
Step 1: Analyze pure push fan-out (A)
Push to all followers synchronously causes huge write amplification for celebrities, increasing write latency and storage.Step 2: Analyze pure pull fan-out (C)
Pull reduces write cost but increases read latency and complexity for users with many followers.Step 3: Evaluate hybrid fan-out (B)
Hybrid pushes to users with many followers (to reduce read latency) and pulls for users with few followers (to reduce write amplification), balancing both latencies.Step 4: Evaluate push only for active users (D)
Activity-based push doesn't address follower count skew effectively.Final Answer:
Option C -> Option CQuick Check:
Hybrid fan-out balances write and read latency by follower count [check]
Solution
Step 1: Understand queue role in decoupling
The queue buffers submissions so downstream processing is asynchronous.Step 2: Trace failure impact
If queue crashes, submissions accepted by API but not delivered downstream, causing processing delays (C). Silent loss (A) is prevented by persistence; blocking API (B) contradicts decoupling; automatic failover (D) is ideal but not guaranteed.Final Answer:
Option D -> Option DQuick Check:
Queue crash -> accepted but undelivered applications -> delayed processing [check]
Solution
Step 1: Analyze freshness and latency requirements
Trending photos must be updated with low latency and high freshness, ruling out long batch intervals.Step 2: Evaluate architectures
Batch jobs every 6 hours (A) are too stale. Client polling (C) adds load and latency. CDN cache invalidation (D) is coarse-grained and slow. Streaming pipeline (B) updates trending scores in real-time and stores in fast KV store, meeting freshness and latency.Final Answer:
Option D -> Option DQuick Check:
Streaming pipeline enables real-time trending updates [check]
Solution
Step 1: Analyze Feature Store scaling (A)
Feature Stores often scale horizontally with caching and sharding; not usually first bottleneck.Step 2: Analyze Kafka ingestion cluster (B)
Kafka partitions limit parallelism; increasing partitions can break ordering guarantees per user, making scaling challenging and causing ingestion bottlenecks.Step 3: Analyze Rule Engine and Scoring (C and D)
Rule Engine can be scaled horizontally with stateless evaluation; scoring caches can be sharded by user ID, so less likely first bottleneck.Final Answer:
Option C -> Option CQuick Check:
Kafka partition limits -> ingestion bottleneck at 10x scale [check]
