Practice
Solution
Step 1: Identify alerting logic type
The requirement is to detect when a metric exceeds a fixed limit for a duration, which is a classic threshold alert scenario.Step 2: Match component to logic
Threshold-based alerting components are designed to evaluate metrics against static limits over time windows, unlike anomaly detection which looks for statistical deviations.Final Answer:
Option A -> Option AQuick Check:
Threshold alerting matches fixed limit checks over time [check]
Solution
Step 1: Identify lock service role in reservation flow
The lock service ensures exclusive access to room inventory during reservation to prevent double booking.Step 2: Trace failure impact
Without the lock service, Inventory cannot reliably mark rooms as unavailable, leading to stale or incorrect availability states shown to users (Inventory service marks rooms as available incorrectly, causing UI to show wrong availability). Reservations may still proceed but with inconsistent inventory state. Blocking indefinitely (Reservation requests block indefinitely waiting for locks, causing user timeouts and failed bookings) is unlikely as fallback mechanisms exist. Payment processing (Payment processing fails because it depends on the lock service for transaction ordering) is independent of locking. Double bookings (Reservations proceed normally but double bookings increase due to lack of coordination) may increase but the immediate failure is incorrect inventory state.Final Answer:
Option C -> Option CQuick Check:
Lock service failure causes stale inventory availability state [check]
Solution
Step 1: Role of shard key index
Shard key index is critical for routing queries to correct shards and maintaining data partitioning.Step 2: Impact of losing shard key index
Without the index, shards cannot serve queries properly and reject operations until index rebuild, causing downtime.Final Answer:
Option C -> Option CQuick Check:
Shard key index loss causes shard query rejection and downtime [check]
Solution
Step 1: Understand offset commit role
Offset commits record progress; disabling commits means no progress saved.Step 2: Trace failure impact
On crash, consumer restarts from last committed offset (which is old), reprocessing messages and causing duplicates.Final Answer:
Option D -> Option DQuick Check:
No offset commit -> consumer may fail to rejoin group due to missing offsets [check]
Solution
Step 1: Identify stateful bottlenecks
Chat servers maintain WebSocket connections statefully, binding clients to specific servers.Step 2: Scaling challenges
At 10x scale, adding servers doesn't move existing connections, causing uneven load and resource exhaustion.Step 3: Why others fail later
Databases can be sharded (The database because it cannot handle increased write throughput without sharding), load balancers scale horizontally (The load balancer because it cannot distribute connections evenly at high scale), and CDNs handle scale well (The CDN because cache invalidation delays increase latency).Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket servers -> resharding limits cause first failure [check]
