Practice
Solution
Step 1: Trace Embedding Service behavior at Step 4
When cache miss occurs, the service must retrieve embedding from persistent storage to maintain consistency.Step 2: Evaluate options
Returning error (A) breaks user experience; ignoring event (C) loses data; synchronous recomputation (D) is expensive and blocks processing. Fetching from storage and updating cache (B) ensures availability and eventual consistency.Final Answer:
Option B -> Option BQuick Check:
Cache miss triggers fetch from storage and cache update [check]
Solution
Step 1: Identify fallback routing requirements
The fallback must be reliable and decoupled from real-time intent classification to avoid blocking user queries.Step 2: Evaluate component suitability
A message queue decouples processing, enabling asynchronous fallback handling and retry mechanisms. Relational DB synchronous writes (A) cause latency. REST API direct calls (C) block the main flow. In-memory cache (D) lacks durability and reliability.Final Answer:
Option D -> Option DQuick Check:
Message queue decouples and buffers fallback reliably [check]
Solution
Step 1: Calculate daily storage
Multiply 500,000 objects by 2MB each = 1,000,000 MB = 1TB per day.Step 2: Eliminate other options
500GB per day, assuming 1MB average object size instead uses wrong object size; 2TB per day, assuming 4MB average object size instead doubles size incorrectly; Cannot estimate without knowing retention period ignores that retention affects total storage, not daily estimate.Final Answer:
Option B -> Option BQuick Check:
500K x 2MB = 1TB daily storage [check]
Solution
Step 1: Understand how tracing handles missing parent IDs
Spans without parent IDs are treated as root spans, starting new trace trees.Step 2: Eliminate other options
Discarding spans loses data unnecessarily; buffering indefinitely risks memory leaks; trace completeness requires all spans, so it's not complete yet.Final Answer:
Option B -> Option BQuick Check:
Missing parent ID -> new root span starts trace segment [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]
