Chaos Engineering
Introduction to Real life Application
Introduction to Our Real Life Application
In this hands-on lab, you will deploy a microservices-based pet adoption website on AWS and run Fault Injection Simulator (FIS) experiments. The application showcases pets available for adoption, complete with images, pricing, and details, and leverages AWS services for high availability, scalability, and resilience.
Note
This tutorial uses real AWS resources and may incur charges. Clean up your environment after completion to avoid unexpected costs.
The complete source code for each microservice is available on GitHub. This lab is adapted from the AWS Workshop Studio and provides step-by-step instructions to replicate the environment in your AWS account.
The pet adoption system follows microservices principles and is composed of three core services. Each service uses multiple AWS components to ensure redundancy, scalability, and secure data handling.
Microservice | Compute | High Availability | Auto Scaling | Core Services |
---|---|---|---|---|
Pet Adoption Web | Amazon EKS (2 EC2 worker nodes) | Multi-AZ EC2 spread | EC2 Auto Scaling Group | Application Load Balancer (ALB) |
Pet Search API | Amazon ECS (2 EC2 instances) | Multi-AZ EC2 spread | EC2 Auto Scaling Group | ALB, DynamoDB (metadata), Amazon S3 (images) |
Pet Payment API | AWS Fargate (2 tasks) | ALB balanced tasks | Fargate Auto Scaling | API Gateway, AWS Lambda, Amazon Aurora PostgreSQL |
1. Pet Adoption Web Microservice
- Compute: Runs on an Amazon EKS cluster backed by two EC2 worker nodes.
- High Availability: EC2 instances are distributed across two separate Availability Zones.
- Traffic Distribution: Incoming web traffic is routed through an Application Load Balancer (ALB).
- Scalability: The EC2 nodes are managed by an Auto Scaling group that scales out based on CPU and network utilization.
2. Pet Search API Microservice
- Compute: Deployed in an Amazon ECS cluster on two EC2 instances.
- High Availability: Instances run across two Availability Zones for fault tolerance.
- Traffic Distribution: An ALB fronts the ECS service to balance search requests.
- Scalability: The ECS cluster uses an Auto Scaling group to adjust capacity dynamically.
- Data Storage:
- Amazon DynamoDB stores pet metadata (name, price, availability).
- Amazon S3 hosts pet images, enabling efficient content delivery.
3. Pet Payment API Microservice
- Compute: Leverages AWS Fargate to run two serverless containers.
- High Availability: Fargate tasks are spread across multiple Availability Zones and balanced by an ALB.
- Scalability: Task counts adjust automatically via AWS Application Auto Scaling.
- API Integration:
- Amazon API Gateway receives payment requests.
- AWS Lambda functions validate the request, fetch pet details from DynamoDB, and process images from S3.
- Database:
- Amazon Aurora PostgreSQL handles transactional data with a Multi-AZ configuration (one writer, one reader) for automatic failover.
As illustrated above, the architecture spans multiple Availability Zones, incorporates load balancers and auto-scaling groups, and is designed to maximize uptime and resilience.
Links and References
- AWS Workshop Studio
- Amazon EKS Documentation
- Amazon ECS Documentation
- AWS Fargate Documentation
- AWS FIS Documentation
Watch Video
Watch video content