Practice
Solution
Step 1: Understand Kafka consumer commit semantics
Kafka commits offsets only after successful processing. If downstream is unavailable, the message is not committed.Step 2: Delivery Worker retries uncommitted messages
Uncommitted messages remain in the topic and will be redelivered on retry, ensuring no message loss.Final Answer:
Option D -> Option DQuick Check:
Kafka offset commit after processing -> retries on failure [check]
Solution
Step 1: Identify need for immediate, atomic invalidation
Price updates require instant invalidation of all related pages to avoid stale data.Step 2: Evaluate strategies
Long TTL with manual purge delays invalidation; short TTL causes high cache misses; client-side headers don't guarantee server cache invalidation; surrogate keys enable atomic invalidation of related content.Final Answer:
Option A -> Option AQuick Check:
Surrogate keys enable atomic, immediate invalidation of related cache [check]
Solution
Step 1: Analyze CAP trade-offs
Prioritizing availability over consistency during partitions means relaxing strict consensus.Step 2: Evaluate options
Raft and Paxos enforce strong consistency, sacrificing availability; centralized locks create single points of failure; eventual consistency allows availability with conflict resolution.Final Answer:
Option C -> Option CQuick Check:
Eventual consistency favors availability during partitions [check]
Solution
Step 1: Analyze log storage requirements
Logs are write-once, large volume, and require fast analytical queries.Step 2: Evaluate columnar data warehouse
Columnar stores optimize for append-only writes and fast scans, reducing cost and improving query speed.Final Answer:
Option C -> Option CQuick Check:
Columnar warehouse -> optimized for append-only and analytics [check]
Solution
Step 1: Identify bottleneck under high concurrency
Lock manager handles concurrency control; at 10x load, lock contention increases exponentially.Step 2: Compare other components
Query optimizer scales well with caching; storage and network scale with hardware upgrades; lock manager contention is harder to mitigate.Final Answer:
Option C -> Option CQuick Check:
Lock manager contention -> first bottleneck at high transaction scale [check]
