How sannidhisriram-06/java-self-healing-microservice works
This is a Spring Boot service packaged as a Docker container and run on AWS behind an Application Load Balancer. The main request path is client → ALB → service controller → plaintext response. Its distinguishing capability is layered health-based recovery: the app exposes health status, Docker reports container health, the ALB isolates unhealthy targets, and the Auto Scaling Group replaces instances and scales on CPU. Terraform defines the AWS environment; a GitHub Actions workflow builds and scans images but does not deploy them. Infrastructure and pipeline links below follow README descriptions; their source was not sampled.
Main entry points: compute.tf EC2 Auto Scaling · alb.tf Target Group · HelloController.java Root Controller · vpc.tf VPC and Subnets
Components 13
Application
- Spring Boot Service
src/main/java/com/sriram/selfhealing/SelfhealingApplication.java - Root Controller
src/main/java/com/sriram/selfhealing/HelloController.java
Health and Recovery
- Actuator Health
src/main/resources/application.properties - Docker Container
Dockerfile
AWS Infrastructure
- Load Balancer
terraform/alb.tf - Target Group
terraform/alb.tf - EC2 Auto Scaling
terraform/compute.tf - VPC and Subnets
terraform/vpc.tf - Security Groups
terraform/security.tf
Image Delivery
- CI Workflow
.github/workflows/ci.yml - Docker Hub
Other components
- HTTP Client
- Developer
Connections 17
- HTTP Client → Load Balancer: sends requests
README.md - Load Balancer → Target Group: routes traffic
README.md - Target Group → Root Controller: forwards requests
README.md - Root Controller → HTTP Client: returns status
README.md - Root Controller → Spring Boot Service: runs within
- Target Group → Actuator Health: checks health
README.md - Docker Container → Actuator Health: polls health
README.md - Target Group → EC2 Auto Scaling: reports failures
README.md - EC2 Auto Scaling → EC2 Auto Scaling: replaces instances
README.md - EC2 Auto Scaling → EC2 Auto Scaling: scales on CPU
README.md - VPC and Subnets → Load Balancer: hosts
README.md - VPC and Subnets → EC2 Auto Scaling: hosts
README.md - Security Groups → Load Balancer: allows ingress
README.md - Security Groups → EC2 Auto Scaling: restricts ingress
README.md - Developer → CI Workflow: pushes changes
README.md - CI Workflow → Docker Hub: builds and pushes
README.md - Docker Hub → EC2 Auto Scaling: manually pulled by
README.md