Sign in to practice all 58 questions with progress tracking and AI explanations.
1. A monolithic e-commerce application experiences cascading failures where a slow inventory service causes the entire checkout process to hang. Which architectural principle best addresses this?
- A.Add more instances of the monolith horizontally behind a load balancer so that traffic is distributed and no single instance bears the full processing load.
- B.Scale the monolith vertically by adding more CPU and memory, which gives the inventory service more resources and prevents it from slowing down under load.
- C.Introduce a caching layer in front of the inventory database to reduce slow database calls and speed up the inventory service response times.
- D.Adopt loose coupling by decomposing the application into independent microservices communicating via asynchronous queues, so a slow inventory service does not block checkout.✓ Correct
Explanation
Loose coupling via asynchronous communication isolates failures — a slow inventory service queues requests rather than blocking checkout. Scaling and caching treat symptoms but leave the tight coupling that causes cascading failures intact.
2. Which statement BEST describes a core benefit of microservices architecture compared to a monolithic application?
- A.Microservices eliminate the need for API contracts between teams because services share a single in-process memory space and communicate directly.
- B.Microservices are easier to debug than monoliths because all logs from every service are automatically written to a single centralized log file by default.
- C.Each microservice can be deployed, scaled, and updated independently, so changing the payment service does not require redeploying the entire application.✓ Correct
- D.Microservices reduce the total number of network calls because each service handles all business logic internally rather than delegating to other services.
Explanation
Independent deployability and scalability per service is the hallmark microservices benefit. The other options invert reality — microservices increase network calls, complicate distributed tracing, and require strict API contracts between independent teams.
3. A financial application processes payment transactions and cannot tolerate duplicate processing or out-of-order messages. Which SQS queue type should be used?
- A.Standard queue, because it offers higher throughput than FIFO and the application can use deduplication IDs in code to handle any occasional duplicate messages.
- B.FIFO queue with long polling disabled, because short polling processes messages faster and is better suited for time-sensitive financial transactions.
- C.Standard queue with a Dead-Letter Queue attached, because the DLQ automatically removes duplicate messages before they reach downstream consumers.
- D.FIFO queue, because it guarantees exactly-once processing and strict first-in-first-out message ordering, which is essential for financial transaction integrity.✓ Correct
Explanation
SQS FIFO queues provide exactly-once processing and strict ordering — critical for financial workflows. Standard queues offer at-least-once delivery (duplicates possible) and best-effort ordering; DLQs handle failed messages, not duplicates.
4. A worker picks up an SQS message but needs 45 seconds to process it. The queue Visibility Timeout is 30 seconds. What will happen?
- A.SQS automatically detects the consumer is still active and extends the Visibility Timeout, so duplicate processing never occurs in this scenario.
- B.The message is moved to the Dead-Letter Queue after 30 seconds because it was not successfully deleted within the configured Visibility Timeout.
- C.The message becomes visible again after 30 seconds and another consumer may pick it up, potentially causing duplicate processing of the same message.✓ Correct
- D.SQS terminates the consumer connection after 30 seconds, requiring the worker to reconnect before it can delete the message from the queue.
Explanation
When the Visibility Timeout expires before deletion, SQS re-queues the message for other consumers — risking duplicates. SQS does NOT auto-extend timeouts; the consumer must proactively call ChangeMessageVisibility if processing will take longer than the configured timeout.
5. An SQS consumer is making hundreds of empty API calls per minute against an empty queue, increasing cost and CPU usage. Which feature eliminates this waste?
- A.Increase short polling frequency so the consumer checks more often and processes messages the instant they arrive in the queue.
- B.Attach a Dead-Letter Queue to capture failed receives, which indirectly reduces the number of empty polling attempts the consumer needs to make.
- C.Switch to a FIFO queue, since FIFO batches messages together and returns multiple messages per API call, reducing the rate of empty poll responses.
- D.Enable long polling by setting ReceiveMessageWaitTimeSeconds to up to 20 seconds, so SQS holds the connection open until a message arrives before returning.✓ Correct
Explanation
Long polling (ReceiveMessageWaitTimeSeconds 1-20s) eliminates empty responses by holding the connection open until a message arrives or the wait expires, dramatically cutting API calls and cost. Short polling always returns immediately regardless of whether messages exist.
Practice all 58+ questions in this domain
Start free practice →