This project demonstrates a Multi-Region Disaster Recovery (DR) System for cloud applications, ensuring high availability, automated failover, and minimal data loss in case of regional outages.
- Multi-region deployment with AWS
- Automated failover using Route53 health checks
- Stateless Dockerized application
- Replicated database instances
- Infrastructure as Code (Terraform)
- Health monitoring and failover scripts
- Primary Region: Handles live traffic under normal conditions
- Secondary Region: Standby for failover, maintains replicated data
- Route53 DNS: Monitors health and switches traffic automatically
- Application: Stateless Flask app in Docker
- Database: PostgreSQL instances replicated across regions
multi-region-dr/
βββ README.md
βββ infrastructure/
β βββ provider.tf
β βββ vpc.tf
β βββ rds.tf
β βββ route53.tf
βββ app/
β βββ app.py
β βββ requirements.txt
β βββ Dockerfile
βββ scripts/
βββ failover.py
- Provision Infrastructure
terraform init terraform plan terraform apply
- Build Docker App
docker build -t multi-region-app ./app
- Run App
docker run -p 80:80 multi-region-app
- Test Failover
python scripts/failover.py
- AWS Account with IAM permissions
- Terraform >= 1.5
- Docker
- Python 3.11+
- Boto3 library for AWS SDK in Python
- Route53 health checks
- Flask
/healthendpoint - Manual or automated failover testing
- Active-Active multi-region deployment
- Zero-downtime failover
- Chaos testing for disaster simulation
- Integration with Prometheus / CloudWatch for alerting
β¨ Iβm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin
π Explore courses and resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated tutorials, real-world projects, and hands-on experience. Level up your tech game today! π»β¨
Zeba Academy is a learning platform dedicated to coding, technology, and development.
β‘ Visit our main site: zeba.academy
β‘ Explore hands-on courses and resources at: code.zeba.academy
β‘ Check out our YouTube for more tutorials: zeba.academy
β‘ Follow us on Instagram: zeba.academy
Thank you for visiting!