Practice
Solution
Step 1: Understand Delivery Worker behavior on subscriber presence TTL expiry
If TTL expired, subscriber is considered offline. Delivery Worker does not retry immediately (The Delivery Worker immediately retries delivery without delay) or mark undeliverable (The Delivery Worker marks the message as undeliverable and stops retries) because retries are needed. It does not refresh TTL (The Delivery Worker queues the message for later retry after refreshing TTL) as TTL is subscriber-driven.Step 2: Recognize fallback to backup subscriber for high availability
Delivery Worker forwards message to backup subscriber or alternative delivery path to ensure eventual delivery.Final Answer:
Option A -> Option AQuick Check:
Expired TTL -> fallback delivery to backup subscriber [check]
Solution
Step 1: Evaluate client-specific optimization needs
Separate BFF layers per client type allow tailored APIs, improving UX and reducing client complexity.Step 2: Assess maintainability
Separate BFF layers per client type behind a common API Gateway isolates client-specific logic in BFFs, keeping microservices generic and maintainable. Single API Gateway forwarding requests directly to microservices with client logic inside services mixes client logic into services, increasing coupling. One monolithic backend serving all clients with feature flags for client differences's monolith reduces flexibility and scalability. Client apps call microservices directly, bypassing API Gateway and BFF breaks encapsulation and complicates security.Final Answer:
Option B -> Option BQuick Check:
Separate BFFs isolate client logic, improving maintainability and optimization [check]
Solution
Step 1: Trace producer behavior on broker failure
Producers get errors on send; without retries, messages are lost. They do not block indefinitely (A).Step 2: Trace consumer behavior
Consumers cannot fetch new messages; cached messages may be consumed but no new delivery occurs, causing stalls. Duplication (D) is prevented by offset commits.Final Answer:
Option A -> Option AQuick Check:
Broker failure causes producer errors and consumer stalls, risking message loss [check]
Solution
Step 1: Understand machine ID role in uniqueness
Machine ID differentiates ID generators on different machines; same machine ID risks collisions.Step 2: Analyze collision handling
Different timestamps alone (A) do not guarantee uniqueness if clocks are synchronized; sequence number does not auto-adjust across machines (C is incorrect). System does not detect conflicts automatically (D).Step 3: Correct failure mode
Duplicate IDs are generated if machine IDs collide, causing data corruption or overwrite.Final Answer:
Option A -> Option AQuick Check:
Same machine ID + same timestamp -> duplicate IDs and data corruption [check]
Solution
Step 1: Identify HTTP/3 transport and encryption
HTTP/3 uses QUIC over UDP with built-in TLS encryption per connection, increasing CPU load for handshake and encryption at scale.Step 2: Eliminate other bottlenecks
UDP packet loss is network-level, not server bottleneck; WebSockets are not natively supported by HTTP/3 but unrelated to scaling HTTP/3 itself; HTTP/3 does not use TCP.Final Answer:
Option B -> Option BQuick Check:
QUIC's per-connection TLS handshake CPU load limits HTTP/3 scale [check]
