Practice
Solution
Step 1: Trace Kafka's role in order processing
Kafka decouples order acceptance from inventory update; if Kafka is down, inventory update messages are lost or not sent.Step 2: Analyze failure impact
API layer (B) uses async calls, so requests don't block. Payment retries (D) are independent. Accepting orders without inventory update (C) causes overselling.Final Answer:
Option D -> Option DQuick Check:
Kafka down -> inventory updates lost -> overselling risk [check]
Solution
Step 1: Analyze latency and accuracy trade-offs
Synchronous updates (Synchronous billing updates on every tenant API call to the billing database) add latency; polling (Periodic polling of tenant usage logs by the billing service every hour) delays billing data; in-memory counters (Embedding billing logic directly in the tenant service to update counters in-memory) risk data loss.Step 2: Evaluate asynchronous event-driven approach
Asynchronous event-driven usage aggregation via a message queue and batch processing decouples billing from tenant requests, ensuring accurate aggregation with minimal latency impact.Final Answer:
Option A -> Option AQuick Check:
Event-driven async billing -> accurate, low-latency tenant requests [check]
Solution
Step 1: Understand Kafka's role in ingestion
Kafka decouples ingestion; if unavailable, producers (WebSocket Server) cannot push messages.Step 2: Trace failure impact
WebSocket Server buffers updates temporarily but memory is limited; blocking would cause backpressure but usually async buffers exist.Final Answer:
Option A -> Option AQuick Check:
Kafka outage causes buffering, not silent loss or blocking immediately [check]
Solution
Step 1: Understand idempotency store role in retries
Without the store, the API cannot verify if a request is a retry, so it must delay processing to avoid duplicates.Step 2: Eliminate other options
Rejecting all requests is possible but not typical; processing retries as new causes duplicates, which is avoided; fallback caches are uncommon and inconsistent.Final Answer:
Option B -> Option BQuick Check:
Unavailable idempotency store causes request queuing to prevent duplicates [check]
Solution
Step 1: Understand cache failure impact
Without the cache, the API Gateway cannot track usage accurately, often defaulting to conservative rate limit errors to protect backend.Step 2: Evaluate other options
Silent drops cause user confusion; bypassing limits risks overload; automatic fallback to DB rate limiting is rare and slow.Final Answer:
Option A -> Option AQuick Check:
Cache failure -> conservative rate limit errors -> user impact [check]
