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?
- Loose coupling; use an asynchronous messaging service to decouple the payment transaction from the kitchen order delivery process.Answer
- BDesign for failure; consolidate the payment and kitchen order systems into a single monolithic application on a high-capacity Amazon EC2 instance.
- CElasticity; configure Auto Scaling to launch additional web servers when the database transaction queue grows due to connection timeouts.
- DScalability; 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
Key Concept
Loose coupling and asynchronous messaging to prevent cascading failures in distributed systems.