AppSync GraphQL Gateway as a Router in Gateway design Pattern and Strangler Pattern to migrate from Monolith to Microservices
--
Two famous Microservices design patterns are “API Gateway design pattern” and “Strangler pattern”. In this article, I am proposing a design that will merge both patterns together using AWS serverless approach.
The Strangler Pattern
The Strangler Pattern is used to migrate from a legacy system (ex: Monolithic) to a modern system (ex: Microservices). It is defined in Microsoft Design patterns at https://docs.microsoft.com/en-us/azure/architecture/patterns/strangler.
As shown in the figure above, there is a “Strangler Facade” that will route the migrated calls to the modern system and keep strangling the old one, until, eventually, remove the facade and only call the Modern System.
The API Gateway Pattern
As defined at https://microservices.io/patterns/apigateway.html, the API Gateway is used to have a single gateway to the system
AppSync as an API Gateway and Strangler Facade
In this article, the following design uses AWS AppSync as an API Gateway and Strangler Facade as explained in AWS documents at https://aws.amazon.com/blogs/mobile/appsync-microservices/.
Here is the final design:
Thanks
Rany Elhousieny
https://www.linkedin.com/in/ranyelhousieny/
https://resume.rany.elhousieny.com