A few days ago, I challenged myself to deploy a real-world cloud architecture instead of just running applications locally.
*The goal was simple:
Deploy a Book Review Web Application on the cloud using a secure three-tier architecture.
But like most cloud projects… it quickly became much more than that.
*I had to deal with:
networking
database authentication issues
SSL enforcement
load balancing
debugging Node.js deployment problems
By the end of the project, I had built a fully working cloud system on Microsoft Azure.
This post walks through what I built, the problems I faced, and how I solved them.
*What I Built
The application is a Book Review platform built with:
Frontend
Next.js
Backend
Node.js + Express
Database
MySQL
*Instead of deploying everything on one server, I used a ****Three-Tier Architecture.
Internet
│
Public Load Balancer
│
Web Tier (Next.js + Nginx)
│
Internal Load Balancer
│
App Tier (Node.js API)
│
Database Tier (Azure MySQL)
Each tier runs independently, which is how most production systems are designed.
☁️ ****Azure Services Used
Here are the core services I used:
Azure Virtual Network
Azure Virtual Machines
Azure Network Security Groups
Azure Load Balancer
Azure Database for MySQL Flexible Server
This setup allowed me to design secure network segmentation between application layers.
****Step 1 — Creating the Network Architecture
First I created a Virtual Network with the CIDR block:
10.0.0.0/16
Then I divided it into six subnets.
****Web Tier (Public)
10.0.1.0/24
10.0.2.0/24
****App Tier (Private)
10.0.3.0/24
10.0.4.0/24
****Database Tier (Private)
10.0.5.0/24
10.0.6.0/24
****Why?
Because databases should never be exposed to the public internet.
*Step 2 — Securing the Network
I configured Network Security Groups.
Rules were strict:
*Web Tier
Allow HTTP (80)
Allow HTTPS (443)
Allow SSH (22)
****App Tier
Allow port 3001 from Web Tier only
****Database Tier
Allow port 3306 from App Tier only
This ensured that:
Users can only access the frontend
backend servers remain private
The database stays fully protected
****Step 3 — Deploying the Backend
The backend runs a Node.js API server.
I installed dependencies:
sudo apt update
sudo apt install nodejs npm git
Then I installed PM2 to manage the application.
sudo npm install -g pm2
****Start the backend:
pm2 start server.js --name backend-api
Save the process:
pm2 save
Enable startup on reboot:
pm2 startup
Now the backend runs automatically even if the server restarts.
Step 4 — Setting Up the Database
For the database layer, I used:
Azure Database for MySQL Flexible Server
****Important configurations:
Private network access
SSL required
High availability (Zone redundant)
Read replica
This ensures the database is:
secure
scalable
fault tolerant
****Testing Database Connectivity
From the App VM, I installed the MySQL client.
sudo apt install mysql-client
Then connected using SSL.
mysql -h book-review-mysql.mysql.database.azure.com \
-u username \
-p \
--ssl-mode=REQUIRED
If everything works you should see:
mysql>
**** Problems I Faced (And How I Solved Them)
❌ Problem 1 — MySQL Login Failed
Error:
ERROR 1045 (28000): Access denied for user
Cause:
Azure requires the username format:
username@servername
Solution:
Ebelechukwu@book-review-mysql
❌ *Problem 2 — SSL Connection Required
Azure MySQL enforces SSL.
Solution:
--ssl-mode=REQUIRED
❌ *Problem 3 — Node.js Would Not Start
Error:
npm error: Missing script: start
****Solution:
Instead of npm start, I used PM2.
*Final Result
After everything was configured:
✔ Backend connected to MySQL
✔ Database schema created automatically
✔ Sample books and reviews inserted
✔ API running on port 3001
*Testing:
curl http://localhost:3001
****Response:
Book Review API is running
****Success
What This Project Taught Me
This project helped me understand:
real cloud networking
secure infrastructure design
debugging distributed systems
production style deployments
Most importantly…
Cloud engineering is not just about launching servers.
It’s about designing systems that are secure, scalable, and resilient.
****What I Would Improve Next
Next improvements I plan to add:
Terraform infrastructure
CI/CD pipelines
containerization with Docker
Kubernetes deployment
****Final Thoughts
If you're learning Cloud Engineering or DevOps, I highly recommend building projects like this.
Nothing teaches cloud architecture faster than breaking things and fixing them.
If you’ve built something similar, I’d love to hear about it.
Tags for Dev.to
Use these tags:
Top comments (0)