Question

Difficulty: HardIdentify design principles of the AWS Cloud

A financial services company is migrating its transaction processing system to AWS. The system currently uses an application server that synchronously writes transaction logs to a database and simultaneously invokes a third-party credit check API. If either the database or the third-party API becomes unresponsive, the entire transaction fails, resulting in customer dissatisfaction. Which architectural design modification should the company implement to align with AWS cloud design principles and improve the system's resilience?

  1. A
    Scale the application server vertically to a larger EC2 instance size to handle the concurrent connections and implement a retry mechanism with exponential backoff for the credit check API.
  2. B
    Place the application server and the database within a single Auto Scaling group that scales out dynamically based on database CPU utilization.
  3. Introduce an Amazon Simple Queue Service (Amazon SQS) queue to buffer transaction requests, processing them asynchronously to isolate the application server from database or API downtime.Answer
  4. D
    Configure synchronous multi-region database replication to guarantee high availability and eliminate database write latency.

Answer

Introduce an Amazon Simple Queue Service (Amazon SQS) queue to buffer transaction requests, processing them asynchronously to isolate the application server from database or API downtime.
The correct design uses Amazon Simple Queue Service (Amazon SQS) to decouple the components. By buffering transaction requests in a queue and processing them asynchronously, the core application server is isolated from downstream database latency or third-party credit check API downtime. This aligns with the AWS design principles of loose coupling and designing for failure, ensuring the system remains responsive even if dependencies fail.

Step-by-Step Solution

1
Identify the system bottlenecks and failure domains.
The application server, database, and third-party credit check API are synchronously dependent, meaning any failure in the downstream services causes a total system failure.
Understanding the current tightly coupled state is necessary to apply the correct AWS design principles.
2
Apply the 'loose coupling' and 'design for failure' AWS design principles.
Determine that an asynchronous communication mechanism is required to break the synchronous dependencies.
Loose coupling ensures that components can fail or experience latency independently without causing a cascading failure across the entire system.
3
Select the appropriate AWS service to decouple the components.
Introduce Amazon SQS to queue incoming transaction requests and process them asynchronously.
An SQS queue buffers incoming requests, allowing the application server to accept transactions immediately and processing consumers to retry requests if downstream services are temporarily unavailable.

Key Concept

Loose coupling and design for failure using asynchronous messaging
Estimated Time:2m 0s
Rate this question