AWS Certified Solutions Architect – ProfessionalContinuously Improve Existing SolutionsMedium

A large e-commerce company operates a monolithic application on Amazon EC2 instances that processes millions of customer orders daily. The application is experiencing frequent performance bottlenecks during peak sales events, leading to slow order processing and customer dissatisfaction. The company wants to incrementally modernize the application without a complete rewrite, focusing on the order processing module first. The new order processing module will be developed as a microservice. Which architectural pattern should the company adopt to integrate the new microservice with the existing monolith while ensuring continuous operation?

  1. ADatabase per service
  2. BStrangler Fig Pattern
  3. CDecomposition by subdomain
  4. DShared database pattern
Show answer & explanation

Correct answer: B. Strangler Fig Pattern

The Strangler Fig Pattern is ideal for incrementally refactoring a monolithic application into microservices. It involves gradually replacing specific functionalities of the monolith with new services, redirecting traffic to the new services as they become ready, without interrupting the existing system.

Why the other options are wrong

  • A. Database per service is a microservice database strategy but not an architectural pattern for migrating from a monolith.
  • C. Decomposition by subdomain is a way to design microservices but doesn't specifically address the incremental migration from a monolith.
  • D. Shared database pattern is typically an anti-pattern for microservices, as it tightly couples services, defeating the purpose of microservices.

Strangler Fig Pattern

An architectural pattern for incrementally migrating a monolithic application to a microservices architecture by gradually replacing components.

  • Allows for gradual refactoring without a complete rewrite.
  • Minimizes risk by allowing the old system to run alongside the new.
  • Traffic is redirected from the old component to the new microservice.

Memory trick: The Strangler Fig wraps around the old tree, slowly replacing it.

More Continuously Improve Existing Solutions questions