Practice
1. In the message delivery trace, at Step 4 the Delivery Worker checks Bob's presence TTL in the presence service cache. What happens if Bob's presence TTL has expired at this step?
easy
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- Bob's presence TTL
If Bob's presence TTL expired, Delivery Worker treats Bob as offline and queues message for offline storage.Step 2: Eliminate other options
Marking delivered without sending is incorrect; retrying indefinitely blocks delivery; sending regardless ignores offline status.Final Answer:
Option A -> Option AQuick Check:
Expired presence TTL -> queue for offline delivery [check]
Hint: Expired presence TTL means offline -> queue message [check]
Common Mistakes:
2. In a system where a Layer 7 load balancer receives an HTTP request at step 3, what happens at step 4 when it applies URL-based routing rules?
easy
Solution
Step 1: Understand Layer 7 load balancer behavior at step 4
At step 4, the Layer 7 load balancer inspects HTTP headers (like URL path) to decide routing.Step 2: Eliminate options inconsistent with Layer 7 behavior
Forwarding raw TCP packets (A) is Layer 4 behavior; DNS resolution (C) is client-side; encryption (D) is unrelated here.Final Answer:
Option A -> Option AQuick Check:
Layer 7 LB inspects HTTP headers and routes accordingly [check]
Hint: Layer 7 LB inspects HTTP headers before forwarding [OK]
Common Mistakes:
3. In a message delivery system, at Step 4 the Delivery Worker reads the message offset from Kafka and attempts to deliver it to the consumer. What happens if the consumer's acknowledgment is not received within the configured timeout?
easy
Solution
Step 1: Understand Kafka offset commit semantics
Kafka commits offsets only after successful acknowledgment to avoid message loss.Step 2: Delivery Worker behavior on missing ack
If no ack is received, the worker retries delivery to ensure at-least-once semantics; it does not commit offset or discard messages.Final Answer:
Option A -> Option AQuick Check:
Retries without committing offset -> ensures message redelivery [check]
Hint: No ack -> retry delivery, no offset commit [OK]
Common Mistakes:
4. In a relational database transaction flow, at Step 4 the transaction manager checks the lock table before committing. What happens if the lock is held by another transaction at this step?
easy
Solution
Step 1: Understand lock table role at Step 4
The transaction manager uses the lock table to ensure no conflicting writes before commit.Step 2: Behavior on lock contention
If the lock is held, the transaction manager blocks to maintain serializability, waiting or timing out rather than aborting immediately or skipping checks.Final Answer:
Option B -> Option BQuick Check:
Lock contention causes blocking until release or timeout [check]
Hint: Lock held -> transaction blocks, no skipping or immediate abort [check]
Common Mistakes:
5. For ensuring exactly-once payment event processing in a distributed payment gateway, which architecture is more appropriate given the constraint that external payment processors may send duplicate callbacks?
medium
Solution
Step 1: Identify the need for deduplication and exactly-once semantics
Duplicate callbacks require idempotent processing and event tracking to avoid double charges.Step 2: Evaluate event sourcing with idempotent handlers
Event sourcing stores all events immutably with unique IDs, enabling replay and deduplication.Final Answer:
Option A -> Option AQuick Check:
Event sourcing with idempotent handlers ensures exactly-once processing [check]
Hint: Event sourcing + idempotent handlers handle duplicates best [check]
Common Mistakes:
