Practice
Solution
Step 1: Identify load balancer function
Layer 4 load balancers operate at the transport layer, forwarding TCP/UDP packets based on IP and port without inspecting application data.Step 2: Eliminate options requiring application-level inspection
Layer 7 load balancers and application gateways inspect HTTP headers or content, which is unnecessary and adds overhead here.Final Answer:
Option D -> Option DQuick Check:
Layer 4 load balancer forwards by IP/port without payload inspection [check]
Solution
Step 1: Trace failure impact of partial warming crash
Without completion mark, warming restarts causing duplicate warming and resource waste.Step 2: Eliminate other options
Stale data unlikely if warming overwrites; cache misses occur but duplicate warming is immediate failure; fallback read-through causes latency, not immediate failure.Final Answer:
Option B -> Option BQuick Check:
Crash without completion causes duplicate warming retries [check]
Solution
Step 1: Role of ZooKeeper in Kafka
ZooKeeper manages partition leadership and consumer offsets; losing it affects coordination but not immediate message loss.Step 2: Failure impact on delivery
Without ZooKeeper, offset metadata can become inconsistent, causing consumers to re-read messages and receive duplicates (C); producers may still write (B is partially true but leadership election stalls eventually); cluster does not shut down automatically (D).Final Answer:
Option C -> Option CQuick Check:
ZooKeeper loss -> offset inconsistency -> duplicate consumer messages [check]
Solution
Step 1: Evaluate update and query trade-offs
Rebuilding entire HNSW on every update (Use a single monolithic HNSW index rebuilt entirely on every update) is too slow for real-time.Step 2: Consider hybrid index approach
Maintaining an immutable bulk index plus a small dynamic index (Maintain an immutable HNSW index for bulk data plus a small dynamic index for recent inserts) allows fast queries and incremental updates.Final Answer:
Option B -> Option BQuick Check:
Hybrid immutable + dynamic HNSW balances update speed and query latency [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]
