AWS Certified Solutions Architect – ProfessionalContinuously Improve Existing SolutionsMedium
A global online gaming company's backend microservices communicate synchronously via HTTP API calls. During peak gaming events, a sudden surge in player activity leads to cascading failures across services due to overloaded downstream dependencies, resulting in a degraded user experience. The company wants to improve the resilience and scalability of its microservices communication to handle traffic spikes and prevent cascading failures without significantly re-architecting their individual microservices. Which AWS service should the Solutions Architect recommend?
- AUtilize AWS Step Functions to orchestrate the synchronous API calls between microservices.
- BImplement Amazon API Gateway with API throttling and usage plans.
- CIntroduce Amazon Simple Queue Service (SQS) between microservices for asynchronous communication.
- DDeploy additional Amazon EC2 instances for each microservice and use an Application Load Balancer.
Show answer & explanationAnswer & explanation
Correct answer: C. Introduce Amazon Simple Queue Service (SQS) between microservices for asynchronous communication.
Introducing Amazon SQS between microservices decouples them, allowing them to communicate asynchronously. This acts as a buffer, absorbing traffic spikes, preventing cascading failures, and improving overall system resilience and scalability without requiring significant re-architecture of the individual microservices.
Why the other options are wrong
- A. AWS Step Functions is for orchestrating workflows and managing state between services. While it can introduce some resilience, it primarily orchestrates existing synchronous calls and doesn't inherently decouple services or provide the buffering capability of a message queue to prevent cascading failures during high load.
- B. API Gateway throttling can protect downstream services from being overwhelmed, but it does so by rejecting excess requests, which would still result in a degraded user experience (failed requests) rather than processing them eventually.
- D. While adding more EC2 instances and using an ALB helps with horizontal scaling of individual microservices, it does not address the fundamental issue of tight coupling and synchronous communication that leads to cascading failures when downstream services are overwhelmed.
Asynchronous Microservices Communication (SQS)
Asynchronous communication decouples microservices, allowing them to send messages without waiting for an immediate response. Amazon SQS acts as a message queue, buffering messages and enabling services to process them independently, improving resilience and scalability.
- Decouples services, preventing cascading failures.
- Buffers requests during traffic spikes.
- Improves scalability and resilience of distributed systems.
Memory trick: SQS Secures Spiky Systems.