A large e-commerce company operates a legacy order processing system that frequently experiences performance bottlenecks during peak sales events. The system is a monolithic application running on a single Amazon EC2 instance with a tightly coupled database. The company wants to improve the system's ability to handle high traffic loads efficiently and reliably, without a complete re-write. They also need to ensure that order processing remains available even if backend services are temporarily overloaded. Which solution should a Solutions Architect recommend?
- AScale up the EC2 instance size and provision a larger Amazon RDS instance for the database.
- BMigrate the entire application to AWS Elastic Beanstalk and enable auto-scaling for the EC2 instances.
- CPlace an Amazon CloudFront distribution in front of the application to cache static content and reduce load on the EC2 instance.
- DImplement a Strangler Fig Pattern by gradually extracting order processing functions into new microservices, using Amazon SQS for asynchronous communication, and deploying them on AWS Fargate.
Show answer & explanationAnswer & explanation
Correct answer: D. Implement a Strangler Fig Pattern by gradually extracting order processing functions into new microservices, using Amazon SQS for asynchronous communication, and deploying them on AWS Fargate.
The Strangler Fig Pattern allows for gradual modernization of a monolithic application by extracting services piece by piece. Using Amazon SQS for asynchronous communication decouples the order processing, making it resilient to backend overloads and improving overall availability and scalability, addressing the core issues without a full re-write.
Why the other options are wrong
- A. Scaling up (vertical scaling) provides limited improvements and does not address the underlying architectural issues of a monolithic, tightly coupled system or provide resilience against backend overloads.
- B. Migrating to Elastic Beanstalk and enabling auto-scaling helps with horizontal scaling of the EC2 instances, but it doesn't solve the tight coupling within the monolithic application or provide asynchronous processing for resilience against backend overloads.
- C. CloudFront caches static content, which might reduce some load, but it does not address the performance bottlenecks within the dynamic order processing logic or the tight coupling of the application and database.
Strangler Fig Pattern with SQS
The Strangler Fig Pattern is an incremental refactoring technique where new services gradually replace specific functionalities of a monolithic application. Integrating Amazon SQS enables asynchronous communication, decoupling services and improving resilience and scalability.
- Allows for gradual modernization of monolithic applications.
- Minimizes risk compared to a 'big bang' rewrite.
- Amazon SQS adds resilience through asynchronous processing and message queuing.
Memory trick: Strangler SQS Smoothly Scales.