Microservices with AWS Fargate

Microservices with AWS Fargate

In this lab, we will break down the monolith into microservices.

The monolith provides different API resources on various routes to fetch information about Mysfits, experience likes, or adoptions.

The logic for these resources involves some processing (like ensuring a user is authorized to perform a specific action, that a Mysfit is eligible for adoption, etc.) and performing some interactions with the persistence layer (specifically DynamoDB).

Instead of using many different services interacting directly with one database (adding indexes and data migration is already difficult for 1 application). Therefore, we don’t separate all resource logic into entirely separate services but only move the Process logic to separate services and still use the monolith as a frontend with the database (meaning we don’t entirely switch from monolith to microservices, but only transition the complex parts).

The ALB has another feature called path-based routing, which routes traffic based on URL paths to target groups. This means you will only use a single ALB instance to host your microservices. The monolithic service will receive all traffic to the default ’/’ path. The Adoption and like services will be ’/adopt’ and ‘/like’, respectively.

Microservices with AWS Fargate