Back to Blog
Designing a Multi-Tier Network in OCI: Best Practices and Implementation

Designing a Multi-Tier Network in OCI: Best Practices and Implementation

   Mariusz Antonik    Networking    2 min read    325 views

1. Introduction

In this guide, we'll design and build a classic three-tier architecture in OCI—web, application, and database layers. This is the setup used by nearly every enterprise workload because it provides scalability, separation of concerns, and strong security boundaries.


2. What Problem This Solves

Most OCI tenants run everything in one subnet, causing:

  • No segmentation

  • Broad security rules

  • Exposed databases

  • Hard-to-scale infrastructure

A multi-tier model fixes all of this.


3. Step-by-Step Guide

Step 1 — Create 3 Subnets

 
10.0.10.0/24Public Web 10.0.20.0/24Private App 10.0.30.0/24Private DB

Step 2 — Create NSGs

  • web-nsg → allow 80/443

  • app-nsg → allow port 8080 from web

  • db-nsg → allow port 3306/1521 from app


Step 3 — Configure Gateways

  • Internet Gateway → web tier

  • NAT Gateway → app & DB

  • Service Gateway → DB for backups


Step 4 — Deploy Instances

  • Web servers in public subnet

  • App servers in private subnet

  • DB (MySQL HeatWave or ATP) in DB subnet


Step 5 — Route Tables

Web Subnet:

 
0.0.0.0/0 → Internet Gateway

App Subnet:

 
0.0.0.0/0 → NAT Gateway

DB Subnet:

 
objectstorage → Service Gateway

4. Architecture Diagram

 
Internet │ ┌────────────┐ │ Web LB │ └────────────┘ │ ────────────────────────┼────────────────────────────── PUBLIC SUBNET (Web Tier) Web VM 1 Web VM 2 │ │ ────────────────────────┼────────────────────────────── PRIVATE SUBNET (App Tier) App VM 1 App VM 2 │ │ ────────────────────────┼────────────────────────────── PRIVATE SUBNET (DB Tier) DB Node (ATP / MySQL)

5. Best Practices

  • Always use NSGs over security lists

  • Limit communication only between tiers

  • Push static objects to Object Storage or CDN

  • Offload SSL at the load balancer

  • Enable autoscaling for web/app tiers


6. Troubleshooting

Issue Cause Fix
App can’t talk to DB NSG misconfigured Add correct source NSG
DB can't back up No service gateway Add SGW and route
Web not accessible LB health check failing Check port and firewall

7. Summary

This architecture is the gold standard for scalable, secure cloud deployments. OCI gives you all tools needed to build it cleanly and efficiently.


👉 Download your free guide:
7 OCI Networking Mistakes to Avoid
https://dmcloudarchitect.com/c/7_oci_mistakes_to_avoid.html

About the Author
Mariusz Antonik

Oracle Cloud Infrastructure expert and consultant specializing in database management and automation.

All Tags
#Advanced #alerts #Bash #bash cpu monitoring script #bash monitoring #bash scripting #Beginner #Best Practices #block volume backup #Capacity Planning #cloud backup strategy #cpu bottleneck #CPU Monitoring #cpu monitoring linux #cpu monitoring script linux #cpu trends #cpu usage trends #cpu usage trends linux #create oracle db system in oci #cron cpu monitoring #cron cpu monitoring linux #cron jobs #database monitoring #database performance #detect slow queries mysql #devops #disk capacity planning server #disk forecasting linux #disk growth trend linux #Disk Monitoring #disk usage #disk usage script linux #disk usage trends #Early Detection #easy infrastructure monitoring #free-tier #Guide #health dashboards #Health Reporting #historical server monitoring #how to monitor cpu usage linux #infrastructure #infrastructure health #infrastructure health dashboard #infrastructure health reporting #infrastructure monitoring #infrastructure monitoring report #infrastructure trends #infrastructure trends monitoring #Infrastructure Visibility #lightweight linux monitoring #lightweight monitoring #linux #linux administration #linux cpu monitoring #linux cpu usage #linux disk capacity planning #linux disk usage #Linux monitoring #linux monitoring setup #linux monitoring tools #linux performance #linux performance monitoring #linux server #linux server monitoring #linux servers #linux storage #linux tools #low maintenance monitoring #monitor cpu usage over time linux #monitor linux server health #monitor server trends #monitor small production server #monitoring without complexity #MySQL #mysql health reporting #MySQL monitoring #mysql optimization #MySQL Performance #mysql performance degradation #mysql performance monitoring #mysql performance trends #mysql query performance issues #mysql server monitoring #mysql slow queries #mysql slow query analysis #mysql slow query monitoring #mysql trends #mysql-health #networking #nsg #OCI #oci backup #oci bastion tutorial #oci block volume #oci infrastructure as code #OCI monitoring #oci networking #oci oracle database private subnet setup #oci oracle database tutorial #oci security #oci setup guide #oci terraform tutorial #oci tutorial for beginners #oci vcn terraform #oci virtual machine db system guide #oracle base database service tutorial #oracle cloud bastion #oracle cloud free tier tutorial #oracle cloud infrastructure step by step #oracle cloud infrastructure tutorial #oracle cloud storage #oracle database on oci setup #oracle-cloud #Performance #Performance Degradation #performance monitoring #performance trend monitoring #performance trends #plan disk growth server #practical server monitoring #predict disk usage growth #private instance access #query optimization #Security #security lists #server health #server health reporting #server health weekly report #server monitoring #Server Performance #server trend analysis #server-trends #simple cpu monitoring linux #simple linux monitoring #simple monitoring small business #simple monitoring system #simple ops monitoring #slow queries #slow query reporting mysql #small business infrastructure #small business IT #small business servers #small infrastructure monitoring #small server monitoring #ssh bastion #storage capacity planning linux #storage monitoring #subnets #System Health #system health reporting #terraform oci compute #terraform oracle cloud infrastructure #Trend Monitoring #trend-analysis #trends #Tutorial #vcn