DVA-C02 Question 22
Single answerYou are designing an e-commerce application on AWS. The application requires an architecture where different components like the order processing system, payment gateway, and inventory management system can operate independently and handle failures without impacting each other. Which of the following architectural choices best aligns with these requirements?
- A
Use a tightly coupled architecture where components communicate directly with each other using synchronous API calls.
- B
Use a loosely coupled architecture where components communicate asynchronously using Amazon SQS or Amazon SNS.
- C
Use a monolithic application architecture to ensure all components are tightly integrated.
- D
Use a tightly coupled architecture with Amazon EC2 instances and Elastic Load Balancing for communication between components.
Show answer and explanation
Correct answer: B
Explanation
A loosely coupled architecture is designed to ensure that components can operate independently and communicate asynchronously. This approach is well-suited for systems like e-commerce applications, where different subsystems (e.g., order processing, payment gateway, inventory management) may need to scale, fail, or recover independently. AWS services like Amazon SQS and Amazon SNS enable this type of architecture by facilitating asynchronous communication and decoupling between components.
- A. Incorrect.
This option describes a tightly coupled architecture, which makes components dependent on each other. This is not suitable for handling independent failures or ensuring modularity.
- B. Correct.
This is the correct answer. A loosely coupled architecture using services like Amazon SQS (for queuing) or Amazon SNS (for pub/sub messaging) allows components to operate independently and handle failures without affecting others.
- C. Incorrect.
A monolithic architecture tightly integrates all components into a single application, making it harder to scale or handle independent failures.
- D. Incorrect.
While Elastic Load Balancing can help distribute traffic, this option still describes a tightly coupled architecture where direct dependencies exist between components, which is not ideal for handling independent failures.