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: Identify health detection responsibility
The health check module actively probes backend servers to determine their health status.Step 2: Eliminate other options
DNS resolver changes are slow and indirect; session persistence caches track sessions, not health; client-side retries do not detect server health.Final Answer:
Option A -> Option AQuick Check:
Health check module probes servers directly for health [check]
Solution
Step 1: Analyze write latency and consistency needs
Write-Behind buffers writes, reducing write latency but allowing stale reads.Step 2: Eliminate other options
Write-Through adds synchronous latency; Cache Aside and Read-Through write directly to DB, no buffering.Final Answer:
Option A -> Option AQuick Check:
Write-Behind buffers writes for low latency, tolerates stale reads [check]
Solution
Step 1: Understand consistent hashing role
Consistent hashing minimizes key remapping when shards change.Step 2: Trace failure without consistent hashing
Adding a shard requires rehashing all keys, moving massive data, causing downtime and routing inconsistencies.Final Answer:
Option D -> Option DQuick Check:
Without consistent hashing, shard addition triggers full rehash and data move [check]
Solution
Step 1: Identify stateful components limiting horizontal scaling
Stateful session management binds user sessions to specific Booking Service instances.Step 2: Analyze scaling challenges
User profile DB (A) can be sharded; calendar cache (C) can be scaled horizontally; search index (D) scales with sharding and caching. Stateful sessions (B) require sticky sessions or complex migration, limiting scale.Final Answer:
Option C -> Option CQuick Check:
Stateful session management limits Booking Service horizontal scaling [check]
