Practice
Solution
Step 1: Trace Matching Service behavior at step 4
Matching Service queries Surge Pricing Service for multiplier to calculate fare.Step 2: Understand stale data impact
If surge multiplier is stale due to cache lag, Matching Service proceeds with returned value, causing temporary fare mispricing but no blocking or retries.Final Answer:
Option D -> Option DQuick Check:
Matching Service tolerates stale surge multiplier for availability [check]
Solution
Step 1: Understand TTL role
TTL ensures entries expire after a fixed time to prevent stale data.Step 2: Trace failure without TTL
Without TTL, stale entries never expire, so clients may read outdated data indefinitely.Final Answer:
Option A -> Option AQuick Check:
Disabling TTL causes stale data to persist indefinitely [check]
Solution
Step 1: Analyze branching strategies for scale
Lightweight branch pointers referencing immutable commits allow fast branch creation and merges without locking, supporting high concurrency.Step 2: Evaluate other options
Centralized locking serializes operations, hurting performance; full branch copies waste storage and complicate merges; synchronous replication adds latency and reduces availability.Final Answer:
Option B -> Option BQuick Check:
Immutable commits + lightweight pointers -> scalable branching [check]
Solution
Step 1: Analyze latency and update frequency constraints
High volume requires low latency for common intents and flexibility for complex queries.Step 2: Evaluate architectures
A single large LLM (A) has high latency and update overhead. Multiple replicas (C) improve throughput but still synchronous latency is high. Batch offline (D) delays updates and user experience. Lightweight classifier with async LLM fallback (B) balances fast routing and complex understanding.Final Answer:
Option C -> Option CQuick Check:
Lightweight classifier + async LLM fallback balances latency and accuracy [check]
Solution
Step 1: Analyze scaling bottlenecks
Expiration Worker scans all snippets to delete expired ones; at 10x scale, scan latency grows linearly.Step 2: Compare other components
Relational DB (A) is not primary storage; key-value stores (C) shard well; Kafka (D) scales with partitioning but expiration scanning is a linear bottleneck.Final Answer:
Option C -> Option CQuick Check:
Expiration scanning is linear and slows down first at scale [check]
