Practice
Solution
Step 1: Identify automatic expiration mechanism
TTL automatically expires cached content after a set time without manual action.Step 2: Eliminate manual and selective invalidation
Manual purge requires human action; surrogate keys target groups, not time-based expiry; client-side headers don't enforce server cache expiry.Final Answer:
Option A -> Option AQuick Check:
TTL auto-expires stale cache entries without manual purge [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: Understand average latency limitations
Average latency can be skewed by many fast requests and hide slow request impact, thus missing user experience degradation.Step 2: Why P95 latency is better
P95 latency captures the slowest 5% of requests, which often cause user frustration and indicate performance issues under load.Final Answer:
Option A -> Option AQuick Check:
P95 latency reveals slow requests impacting users better than average [check]
Solution
Step 1: Compare HTTP methods for partial updates
PUT requires full resource; PATCH supports partial updates natively.Step 2: Evaluate JSON Patch benefits
JSON Patch is a standardized format allowing precise partial modifications, reducing payload size and server logic.Final Answer:
Option B -> Option BQuick Check:
PATCH with JSON Patch enables flexible partial updates [check]
Solution
Step 1: Analyze ledger database constraints
Ledger DB enforces strong consistency and atomic double-entry transactions, limiting sharding options.Step 2: Compare other components
Reconciliation (A) can be scaled asynchronously; API gateway (C) can be scaled with stateless design; Kafka (D) scales with partitioning but ledger DB consistency is harder to scale.Final Answer:
Option D -> Option DQuick Check:
Ledger DB consistency limits sharding -> first bottleneck [check]
