6f76c8861e1bdc29a57e8de5ff4d4e10b5fc4e0d
High Availability Architecture
This document outlines the high availability design for the application infrastructure.
Goals:
- Primary hosting in Microsoft Azure
- Automatic failover to on-premise infrastructure
- Minimal downtime
- Disaster recovery backups through CBM Technology
1. Architecture Overview
flowchart TB
A[Architecture Overview]
A --> B[Primary Cloud Azure]
A --> C[Secondary On Prem]
A --> D[Tertiary CBM Backup]
B --> B1[Azure Application Gateway]
B --> B2[Main Application Server]
B --> B3[Primary Database]
B --> B4[External Access with IP Restrictions]
C --> C1[Replica Application Server]
C --> C2[Database Replica]
C --> C3[File Storage Replica]
C --> C4[Used During Internet Loss]
D --> D1[Daily Snapshots of Azure Primary]
D --> D2[Disaster Recovery Scenario]
2. Architecture Flow Diagram
flowchart LR
PC[User PC]
FW[On Prem Firewall Reverse Proxy]
VPN[Site to Site VPN]
INT[Internet]
AZGW[Azure Application Gateway]
AZAPP[Azure Application Server]
AZDB[(Primary Database Azure)]
OPDB[(Replica Database On Prem)]
OPAPP[On Prem Application Server]
PC --> FW
FW --> VPN
VPN --> INT
INT --> AZGW
AZGW --> AZAPP
AZAPP --> AZDB
AZDB --> OPDB
OPDB --> OPAPP
FW --> OPAPP
Normal operation routes traffic to Azure.
If the office internet fails, the firewall redirects users to the on-prem server.
3. DNS Connection
flowchart LR
PC[User PC]
GW[Gateway Firewall]
DNS[app.avexmro.com]
AZ[Azure Cloud Server]
OP[On Prem Server]
PC --> GW
GW --> DNS
DNS -->|WAN UP| AZ
DNS -->|WAN DOWN| OP
Behavior:
Normal operation
app.avexmro.com → Azure
Internet outage
app.avexmro.com → On Prem
WAN state detection is handled by the gateway firewall.
4. Database and File Replication
flowchart LR
AZDB[(Azure Primary Database)]
OPDB[(On Prem Replica Database)]
AZFILES[Azure File Storage]
OPFILES[On Prem File Storage]
AZDB -->|Secure Replication| OPDB
AZFILES -->|Continuous File Sync| OPFILES
Normal state
Azure → On Prem replication
Failover state
On Prem promoted to primary
Replication paused
Recovery state
On Prem → Azure resync
Azure resumes primary role
5. Monitoring Layer
flowchart TB
MON[Health Monitoring System]
AZAPP[Azure Application Server]
AZDB[Azure Database]
OPAPP[On Prem Application Server]
OPDB[On Prem Database]
ALERT[Alerting and Failover Trigger]
MON --> AZAPP
MON --> AZDB
MON --> OPAPP
MON --> OPDB
MON --> ALERT
Monitoring ensures:
- replication health
- server availability
- automatic failover triggers
Possible tools:
- Azure Monitor
- Zabbix
- Uptime Kuma
- Prometheus
6. Failover State Machine
flowchart TD
A[Normal Operation Azure Primary]
B[Internet Loss Detected]
C[Local Failover Mode On Prem Primary]
D[Internet Restored]
E[Data Resynchronization]
F[Return to Normal Azure Primary]
A --> B
B --> C
C --> D
D --> E
E --> F
Failover sequence:
- Azure operates as primary
- Internet outage detected
- On-prem database promoted
- Office operates locally
- Internet restored
- Data resynchronizes to Azure
- Azure resumes primary role
Reliability Model
Expected behavior during failure scenarios:
| Event | Result |
|---|---|
| Azure VM failure | Azure HA handles |
| Azure maintenance | No downtime |
| Office internet outage | Automatic on-prem failover |
| Local server failure | Cloud still available |
| Database corruption | Restore from CBM backup |
| Company power outage | Service interruption |
Description
Languages
Markdown
100%