DEV Community

Muhammad Kamran Kabeer
Muhammad Kamran Kabeer

Posted on

Building a Zero-Downtime Web Cluster on a Dell Latitude

The Problem: The "Single Point of Failure"
Most small businesses host their websites on a single server. If that server crashes, their business stops. In this lab, I solved that problem by building a Distributed System using Nginx and Ansible.

The Architecture: The Traffic Cop
I used a Load Balancer strategy to ensure that even if a server dies, the website stays live.

Front-End: Nginx Load Balancer (Port 8888)

Back-End: Two Nginx Workers (Ports 8081 & 8082)

Key Technical Win: Fault Tolerance
The highlight of this lab was the Chaos Test. By manually stopping one of the web server containers, I verified that the Load Balancer instantly redirected all traffic to the healthy node. The result? Zero downtime for the user.

Tools Used:
Ansible: To automate the deployment and ensure the configuration is repeatable.

Docker: To isolate the services and simulate a multi-server environment on my Dell E7440.

Check out the Standalone Code:
🔗 https://github.com/muhammadkamrankabeer-oss/MK_Labs/tree/main/Lab3_Standalone

Top comments (0)