At Codatron, we believe startups and small companies shouldn’t have to spend big to get an enterprise-grade production environment. We built a simple, secure and low-cost AWS cluster that combines a DMZ load balancer, private front-end and back-end servers, managed MongoDB (Atlas), and automated deployment scripts.
High Availability & Zero-Downtime Deployments
Downtime banners and late-night maintenance windows are a thing of the past. With our cluster design, every critical layer — Load Balancer, Frontend, and Backend — is deployed in a buddy pairing configuration. This means while one server in a pair is being updated or rebooted, its twin continues to serve traffic seamlessly.
The Load Balancer intelligently routes requests only to the healthy nodes, ensuring your users never notice when a deployment or patch is underway. This built-in failover setup guarantees that the application remains online even if one instance encounters issues.
Beyond just reliability, buddy pairing sets the foundation for future scalability. As your user base grows, these pairs can evolve into clusters of servers that scale horizontally, handling thousands of concurrent requests without breaking a sweat. What you get is enterprise-grade uptime and performance — but without the enterprise-grade price tag.

This cluster setup has been successfully deployed for our Asset Management SaaS — AsseTotal (assetotal.com).
Cluster at a glance
- DMZ Load Balancer — single entry point, handles TLS and forwards only to private FE servers.
- FrontEnd (Nginx + Angular) — hosted in private subnet, served over HTTPS from LB; FE forwards API calls to BE.
- BackEnd (Embedded Tomcat Java) — two small instances running app JARs, talks to Mongo Atlas.
- Audit Server (Embedded Tomcat Java) — 1 small instances running app JARs, talks to Mongo Atlas.
- Database — MongoDB Atlas (managed cloud) to avoid local DB maintenance and improve durability.
- Storage — S3 for assets (images, documents), cheap and durable.
Deployment automation
# Stop traffic to BACKend for deployment
ssh backend-A "bash /home/ubuntu/asseTotal/bin/stopTraffic-BE-A.sh"
# Graceful backend update
ssh backend-A "bash /home/ubuntu/asseTotal/bin/stop.sh"
scp app.jar backend-A:/home/ubuntu/asseTotal/releases/
ssh backend-A "bash /home/ubuntu/asseTotal/bin/start.sh"
# Start traffic to BACKend after deployment
ssh backend-A "bash /home/ubuntu/asseTotal/bin/startTraffic-BE-A.sh"
# Stop traffic to FRONTend for deployment
ssh frontend-A "bash /home/ubuntu/asseTotal/bin/stopTraffic-FE-A.sh"
# Frontend redeploy
scp frontend.zip frontend-A:/home/ubuntu/asseTotal/releases/
ssh frontend-A "bash /home/ubuntu/asseTotal/bin/redeploy.sh"
# Start traffic to FRONTend after deployment
ssh frontend-A "bash /home/ubuntu/asseTotal/bin/startTraffic-FE-A.sh"
Minimal cost recommendation
- Load Balancer: t4g.micro
- FrontEnd (x2): t4g.nano
- BackEnd (x2): t4g.micro
- Audit Server : t4g.micro
- Mongo Atlas: M0 or M2 or M5 tier for startups

