Practice
Solution
Step 1: Understand surrogate key purge semantics
Surrogate key invalidation marks keys as expired; actual cache purge happens lazily or on next request.Step 2: Eliminate immediate deletion and TTL update
Immediate synchronous deletion is costly and rare; TTL update is not typical surrogate key behavior; asynchronous invalidation is plausible but surrogate keys usually mark expired state.Final Answer:
Option B -> Option BQuick Check:
Surrogate keys mark expired, actual purge deferred [check]
Solution
Step 1: Understand composite index column order
Composite indexes are ordered by the first column (A), then second (B). Queries filtering only on B cannot efficiently seek the index without filtering on A.Step 2: Analyze index usage at step 3
Since column A is not filtered, the engine must scan the entire index or large portions, resulting in a full index scan rather than an efficient seek.Final Answer:
Option A -> Option AQuick Check:
Composite index requires leading column filter for efficient seeks [check]
Solution
Step 1: Understand Kafka's role in buffering vote events
Kafka buffers vote events reliably; if it fails, vote events cannot be streamed to processors.Step 2: Analyze failure impact
Vote submissions do not block immediately (Vote events cannot be buffered, causing vote submission requests to block or fail immediately wrong) because frontends can still accept votes and cache temporarily. Votes are not lost silently (Users can still vote, but votes are lost silently without any retry wrong) because Redis or other caches buffer them. UI shows stale scores due to lack of processed updates (The UI shows stale post scores but votes are queued in Redis for later processing correct). Votes continue to be processed but ranking updates become inconsistent is incorrect as votes stop flowing, not just ranking inconsistency.Final Answer:
Option B -> Option BQuick Check:
Kafka failure causes stale UI scores; votes buffered in Redis [check]
Solution
Step 1: Understand health check role
Health checks inform GeoDNS about data center availability to avoid routing to down centers.Step 2: Analyze failure impact
Without health checks, GeoDNS cannot detect down data centers, so it may continue routing to them (B). However, many GeoDNS implementations fallback to rerouting to next closest center (C) based on stale or fallback data.Final Answer:
Option D -> Option DQuick Check:
GeoDNS reroutes to next closest center despite missing health checks [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]
