AWS Certified Solutions Architect – ProfessionalContinuously Improve Existing SolutionsMedium

An online gaming company's backend microservices communicate synchronously, leading to cascading failures when a single service experiences high load or downtime. This results in poor user experience, including game freezes and disconnections. The company wants to improve the resilience and scalability of its microservices architecture, decouple services, and handle peak loads gracefully, without requiring real-time responses for all operations. Which architectural improvement should a Solutions Architect recommend?

  1. AScale up all microservices to larger EC2 instance types and use Auto Scaling groups.
  2. BIntroduce a message queue (e.g., Amazon SQS) for asynchronous communication between services.
  3. CRefactor all microservices to use gRPC for inter-service communication.
  4. DImplement API Gateway with aggressive caching for all service endpoints.
Show answer & explanation

Correct answer: B. Introduce a message queue (e.g., Amazon SQS) for asynchronous communication between services.

Introducing a message queue like Amazon SQS enables asynchronous communication between microservices. This decouples services, allowing them to operate independently and process messages at their own pace. It prevents cascading failures, handles peak loads by buffering requests, and improves overall system resilience and scalability.

Why the other options are wrong

  • A. Scaling up EC2 instances or using Auto Scaling groups provides more resources but doesn't solve the underlying issue of synchronous, tightly coupled communication that leads to cascading failures when one service becomes unresponsive. It's a reactive scaling measure, not an architectural decoupling.
  • C. gRPC is a high-performance RPC framework for synchronous communication. While it can improve communication efficiency, it does not fundamentally change the synchronous nature of the interactions or provide decoupling to prevent cascading failures. It's still a point-to-point, real-time communication method.
  • D. API Gateway with caching can improve performance for read-heavy operations but does not address the synchronous communication problem or prevent cascading failures for write operations or service interactions that require processing.

Asynchronous Microservices Communication

A pattern where microservices communicate without waiting for an immediate response, typically using message queues or event buses to decouple senders and receivers.

  • Decouples services, improving resilience.
  • Prevents cascading failures.
  • Enables independent scaling of services.
  • Handles fluctuating loads through message buffering.

Memory trick: Asynchronous communication is like 'sending a letter instead of making a call', no waiting, just send and forget.

More Continuously Improve Existing Solutions questions