DR and Scaling
A hybrid disaster-recovery design, a two-site HA/DR plan and a scaling audit | CheckPoint Business Intelligence | private company project, sanitized
context
Everything ran in one data center behind one router: SQL Server, the API, the edge, the cameras, and the readers that dial a fixed public address. In September 2026 that site lost connectivity for almost four days. The business question that followed was how to survive the next one; the engineering question was whether the API could even run as more than one instance.
problem
A cloud failover is not a copy of the stack. The RFID readers, camera streams and MQTT devices are configured by IP and cannot cross an HTTP edge; a SQL Server availability group whose secondary becomes unreachable pins the primary's transaction log, which had already grown to hundreds of gigabytes once; and a standby that boots with production's configuration would start sending the same SMS. On the scaling side, nobody had measured the API's real load or knew which of its background loops were safe to duplicate.
what I did
- Wrote the hybrid DR design: on-prem primary, cloud warm standby, DNS-only health-checked failover (no shared HTTP edge, because the device protocols cannot cross one), decoupled log shipping over object storage (log backups every five minutes, shipped, restored with NORECOVERY) instead of an availability group, a topology-identical IaaS standby, the device planes kept on-prem, and application interlocks (site role, standby mode, a three-state SMS send mode) that refuse to boot on a mismatch.
- Provisioned the standby's foundation in Azure: the network with its subnets and security groups, a key vault with the secrets and certificates escrowed and round-tripped, zone-redundant storage, log analytics, the SQL standby and application VMs, an Ubuntu edge VM running the same multi-site nginx configuration, point-to-site VPN with per-person certificates and a site-to-site tunnel to the on-prem router, a service principal for automation, a break-glass account and multiple owners.
- Wrote the two-site HA/DR plan for the production database in October 2026: one self-contained plan per licensing case (availability group, basic availability group, cold standby), a step-by-step build of the synchronization with 55 vendor references, three backup layers ending in a locked cloud bucket that nobody can delete, point-in-time and marked-transaction restores, 8 rehearsed drills with expected recovery times, decision rights and outside alerting (3 checks, 7 heartbeats), 10 runbooks, application-tier failover over one tunnel per site, and a chapter of assumptions, open risks with owners and costs: an 83-page PDF built from the planning documents. Planning only; the build waits on a licensing decision.
- Wrote the scaling audit of the production API: an inventory of hosts, processes and versions, a week of edge request logs, database and cache pressure from the engine's own views, and a replication-readiness matrix. Every claim is labelled Verified, Inferred or Unknown: about 80 labelled findings, two dozen of them blockers.
stack
Azure SQL Server Windows Server nginx IPsec PlantUML Python FastAPI
outcome
- A DR plan with a stated recovery point (the log-backup interval), explicit scope statements for the business to sign, and a standby whose network, vault, storage and VMs exist; the data seed and the DNS cutover wait on a business decision.
- Recovery targets the business can hold the plan to (under an hour; four to six hours for a severe outage), with a met-or-missed column for every scenario.
- The scaling verdict, with evidence: the API cannot yet run two instances safely, because all 15 background loops run in every process with no leader election (already true during every A/B overlap), the health endpoint never checks the database, and there is no statement timeout. The measured load is small; the tail latency comes from storage stalls and blocking work on the event loop. The fix order is written down: storage and timeouts first, then a role flag with atomic claims, then a one-versus-two instance test.
Sanitized case study -- no hostnames, IP addresses, account identifiers, or cost figures.