High availability is easy to draw on an architecture diagram.
The interesting part is finding out what actually happens when something fails.
As part of my AWS and DevOps learning, I recently built and tested a two-tier WordPress application on AWS. The goal wasn't just to make the application work — it was to make the web tier capable of handling failures.
The Architecture I Built
The setup included:
- Two public subnets across two Availability Zones
- Two private subnets for the database tier
- Application Load Balancer
- EC2 instances running WordPress
The traffic flow was:
Internet → ALB → EC2 → RDS
The ALB acts as the single entry point for users, while the Auto Scaling Group manages the web instances behind it.
The database was kept private, so it wasn't directly exposed to the internet.
The Part That Actually Mattered: Failure Testing
After getting the application running through the ALB, I didn't want to stop there.
I wanted to see what would happen if an EC2 instance disappeared.
Test 1 — Terminating an EC2 Instance
I manually terminated one of the running web instances.
The Auto Scaling Group detected that the desired capacity was no longer satisfied and launched a replacement instance.
Meanwhile, the ALB continued routing traffic to the healthy target.
That was the moment the architecture started making sense beyond the diagram.
Failure → Detection → Replacement → Recovery
Test 2 — Simulating an Availability Zone Impact
Next, I stopped/removed one web instance to simulate the loss of a web server in one Availability Zone.
The other instance continued serving requests through the ALB.
The ALB endpoint remained accessible, even while one part of the web tier was unavailable.
What I Learned
The biggest lesson from this project was that high availability isn't something you prove by showing a diagram. You prove it by introducing failure.
I also got a much clearer understanding of how these AWS services work together:
VPC provides the network foundation.
Security Groups control who can communicate with whom.
ALB provides a stable endpoint and routes traffic only to healthy targets.
Auto Scaling maintains the required number of web instances and replaces failed instances.
RDS provides the database layer without exposing the database directly to the internet.
One More Important Lesson
I also faced problems while connecting WordPress to RDS.
At one point, WordPress was trying to use the wrong database and returned errors such as:
Access denied for user 'admin'@'%' to database 'mysql'
This forced me to go back and verify the database name, user permissions, endpoint, and WordPress configuration instead of assuming that the network was the problem.
That debugging process was probably as valuable as the successful deployment itself.
Final Takeaway
This project changed the way I look at AWS architectures.
Before building it, "high availability" was mostly a concept I understood from diagrams and documentation.
After terminating instances and watching the infrastructure recover, it became something I could actually observe.
That's the kind of learning I want to continue — build it, break it, troubleshoot it, and understand why it works.
Project Evidence
The deployment was validated through:
- Auto Scaling Group capacity
- EC2 instances across Availability Zones
- Successful WordPress → RDS connectivity
- Automatic EC2 replacement after termination
- Continued application availability during failure testing
Loading article