Member-only story
Using Microservice Patterns in an increasingly Serverless world

When working on an application domain, it is beneficial to use the microservices software design pattern. Microservices have many advantages over monolithic stacks, including being:
Highly maintainable and testable — enabling rapid and frequent development and deployment
Loosely coupled with other services — enabling a team to work independently the majority of time on their service(s) without being impacted by changes to other services and without affecting other services
Independently deployable — enabling a team to deploy their service without having to coordinate with other teams
Capable of being developed by a small team — essential for high productivity by avoiding the high communication head of large teams
Hosting microservices
When it comes to hosting, it is possible to combine this pattern with a serverless framework, such as lambda to create serverless microservices.
- Serverless architectures are application designs that run in managed, ephemeral containers on a “Functions as a Service” (FaaS) platform.
- Such architectures remove much of the need for a traditional always-on server component and may benefit from significantly reduced operational cost, complexity, and engineering lead time.
Serverless microservices in the cloud
To use compute in AWS, it is possible to take advantage of Fargate or a combination of API Gateway and Lambda to host a service in a serverless way. Lambda is supposed to be used for small functions, and maintaining this pattern is key to not over-engineering or complicating your code. Because of the complexity of the flow of some microservices, small Lambdas can be tied together, to replicate more complex behavior. To effectively manage the problem now, and for the future addition of Lambda functions within your microservice, there are multiple ways in which…