Question

Difficulty: MediumIdentify design principles of the AWS Cloud

A food delivery platform processes orders by executing a customer's payment and immediately transmitting the order details to the restaurant's kitchen terminal in a single, synchronous transaction. When a restaurant's internet connection drops, the kitchen terminal becomes unreachable, which causes the payment transaction to time out and fail. Which AWS Cloud design principle should the company apply to prevent kitchen connection issues from impacting the payment process, and how should it be implemented?

  1. Loose coupling; use an asynchronous messaging service to decouple the payment transaction from the kitchen order delivery process.Answer
  2. B
    Design for failure; consolidate the payment and kitchen order systems into a single monolithic application on a high-capacity Amazon EC2 instance.
  3. C
    Elasticity; configure Auto Scaling to launch additional web servers when the database transaction queue grows due to connection timeouts.
  4. D
    Scalability; upgrade the relational database instance class to support a higher number of concurrent open connections.

Answer

Loose coupling; use an asynchronous messaging service to decouple the payment transaction from the kitchen order delivery process.
Implementing loose coupling by introducing an asynchronous messaging service ensures that the payment process and the kitchen order delivery process operate independently. If the kitchen connection drops, the order details are safely buffered in the message queue, allowing the payment transaction to complete successfully without waiting for the kitchen terminal.

Step-by-Step Solution

1
Analyze the scenario to identify the system failure reason.
The failure is caused by a synchronous dependency where the payment transaction blocks while waiting for an external, unreliable network endpoint.
Understanding the root cause is necessary before selecting the appropriate design principle.
2
Apply the appropriate AWS Cloud design principle to break the dependency.
The principle of loose coupling indicates that systems should be designed with independent components so that a failure in one does not affect the others.
Decoupling allows the payment service to function independently of the kitchen terminal's network state.
3
Select the correct architectural pattern to implement the principle.
Introduce an asynchronous queue (such as Amazon SQS) to buffer the kitchen notifications, allowing the payment transaction to complete immediately.
This guarantees that payment processing remains highly available and orders are eventually delivered when the terminal reconnects.

Key Concept

Loose coupling and asynchronous messaging to prevent cascading failures in distributed systems.
Rate this question