Practice
1. In the API Gateway request flow, at Step 3 the Authentication component verifies the JWT token. What happens if the token is expired at this step?
easy
Solution
Step 1: Trace Authentication at Step 3
The Authentication component validates the JWT token; if expired, it must reject the request immediately to prevent unauthorized access.Step 2: Evaluate other options
The request is forwarded to backend services with a warning header risks unauthorized access. The Gateway refreshes the token automatically and retries the request is incorrect because token refresh requires client interaction. The request is routed to a fallback service for manual authentication adds unnecessary complexity and latency.Final Answer:
Option B -> Option BQuick Check:
Expired JWT -> immediate 401 rejection at Gateway [check]
Hint: Expired JWT -> reject immediately at gateway [check]
Common Mistakes:
2. Without the automated rollback system, what exactly breaks when a misconfiguration causes a route leak?
medium
Solution
Step 1: Trace failure without rollback
Misconfigurations propagate incorrect routes; without rollback, manual detection delays fix.Step 2: Eliminate other failure modes
Silent drops (A) don't occur; automatic quarantine (C) would cause total outage, not typical; alert floods (D) don't prevent traffic misrouting.Final Answer:
Option D -> Option DQuick Check:
Manual fix delays cause prolonged incorrect routing [check]
Hint: No rollback means manual fix delays outages [check]
Common Mistakes:
3. For a system requiring guaranteed message processing with minimal latency, which retry strategy is best suited when transient failures occur?
medium
Solution
Step 1: Analyze retry strategies for latency and reliability
Scheduled retries with delayed queues (B) balance retry timing and system load, reducing hot loops.Step 2: Evaluate other options
Immediate retries (A) risk overload; manual retries (C) add latency; infinite retries (D) cause resource exhaustion.Final Answer:
Option C -> Option CQuick Check:
Delayed queue retries balance latency and failure handling [check]
Hint: Delayed retries avoid overload, unlike immediate or manual retries [OK]
Common Mistakes:
4. If the Kafka broker cluster loses ZooKeeper coordination, what exactly breaks in the message delivery process?
medium
Solution
Step 1: Role of ZooKeeper in Kafka
ZooKeeper manages partition leadership and consumer offsets; losing it affects coordination but not immediate message loss.Step 2: Failure impact on delivery
Without ZooKeeper, offset metadata can become inconsistent, causing consumers to re-read messages and receive duplicates (C); producers may still write (B is partially true but leadership election stalls eventually); cluster does not shut down automatically (D).Final Answer:
Option C -> Option CQuick Check:
ZooKeeper loss -> offset inconsistency -> duplicate consumer messages [check]
Hint: ZooKeeper loss corrupts offsets causing duplicates, not immediate loss [check]
Common Mistakes:
5. For a global DNS service aiming to minimize latency for users worldwide, which architecture is more appropriate and why?
medium
Solution
Step 1: Analyze latency requirements and architecture options
A single centralized server creates latency for distant users and is a single point of failure. Peer-to-peer systems lack reliability and consistency guarantees. Recursive servers forwarding to root servers without caching cause excessive load and latency.Step 2: Identify benefits of distributed authoritative servers with Anycast
Geographically distributed authoritative servers with Anycast routing direct users to the nearest server, minimizing latency and improving availability.Final Answer:
Option C -> Option CQuick Check:
Distributed authoritative servers + Anycast reduce latency globally [check]
Hint: Anycast + distributed authoritative servers minimize global latency [check]
Common Mistakes:
