Business Continuity, Without the Over-Engineering: Four Levels and the One-Page Document to Write First
Something catastrophic happens to your infrastructure. Your production server is ransomwared. A datacenter cat...
Multi-datacenter deployment gets described two ways in most docs. The first is the marketing version: "deploy to multiple regions, get resilience and performance." The second is the AWS-specific tutorial that assumes you're already paying for Route 53, Global Accelerator, DynamoDB Global Tables, and a dedicated SRE team.
Neither is useful if you have a working single-DC setup and you're wondering whether a second DC is going to help you survive the next traffic surge, cost you twice as much, or break every stateful component you own. Usually the answer is "yes, yes, and yes" depending on how you approach it.
This guide is for teams who already run production on one datacenter and are considering spreading across multiple. It assumes you're going with the same hosting provider across regions (Dedimax's own datacenters, or another provider's), which is realistic for 95% of multi-DC decisions; a short note at the end covers multi-provider setups for the few who actually need that. The focus is on actively serving traffic from multiple datacenters for capacity, latency, and isolation, not on a passive-standby disaster recovery pattern (that's covered by the Business Continuity Plan guide).
What this guide covers: why multi-DC is a capacity decision not just a resilience one, the three realistic architectural patterns to choose from, the seven things in your application that will break when you cross the datacenter boundary, DNS and database patterns, deploy pipeline changes, observability, and the five mistakes that show up again and again.
Multi-DC gets sold as "redundancy." The real case for multi-DC when you're thinking about traffic is three combined gains:
Capacity: two datacenters serving traffic in parallel give you roughly 1.7x to 1.9x the capacity of one datacenter, not 2x. The gap is coordination overhead: database replication, cache invalidation across regions, deploy coordination. Honest math: budget 1.7x, deliver 1.8x, and be happy.
Latency: a user in the US hitting a server in Frankfurt eats 100-150ms of round-trip latency before the server does anything. Moving that user's requests to a server in the US cuts TTFB (Time To First Byte) by that same 100-150ms, which is typically 40-60% of your perceived response time. Lighthouse scores go up, Core Web Vitals improve, bounce rate drops.
Isolation: a flaky router, a kernel panic, or a BGP misconfiguration in one DC takes out only the traffic routed there. Your worst day becomes "25-50% of traffic degraded" instead of "100% down."
Honest trade-offs: multi-DC costs 2-3x the single-DC setup once you account for duplicate infrastructure, cross-DC bandwidth (egress is not free even between a provider's own DCs), replication traffic, and the engineering time to design it right. If your single-DC setup costs €500/mo, plan for €1200-1500/mo across two DCs, not €1000.
When multi-DC is NOT the right answer: if your single server runs at 20% utilization most of the time, you don't have a capacity problem. Scale vertical. If your user base is >80% in one country, you don't have a latency problem. Add a CDN. If your business can survive a 4-hour DC outage, you don't need multi-DC for resilience either (see the Business Continuity Plan guide for Level 1 and Level 2, which cover most needs).
Multi-DC pays off when three things are simultaneously true: traffic volume saturates a single DC regularly, users are geographically spread, and downtime of 30+ minutes hurts the business measurably.
Three patterns cover 95% of multi-DC designs in production. Pick the one whose trade-offs match your constraints. Don't invent a fourth.
Each datacenter runs a full stack: app, cache, local DB. Users are routed by geography via GeoDNS. Each region is operationally independent for serving. Data is synchronized asynchronously between regions (periodic sync, event stream, or application-level writes to both).

When it fits: users are naturally regional (EU users rarely care about US data, and vice versa). Data model allows eventual consistency between regions. Cross-region traffic is rare.
When it breaks: a user traveling from EU to US expects their account state to be consistent immediately. Cross-region reads are expensive. Write conflicts need application-level resolution.
Operational complexity: lowest of the three. Each region is a small production deploy. Rollbacks are regional.
A global load balancer (anycast IP, Cloudflare Load Balancing, NS1 Pulsar, or similar) routes any user to any region based on health and load. The application layer is fully stateless (no sticky sessions, state in Redis or JWT). The database is replicated: typically a write-primary in one region plus read replicas in others, or a multi-master NewSQL (CockroachDB, YugabyteDB) if the write pattern demands it.

When it fits: application is already stateless (12-factor), users expect consistent experience regardless of where they hit, writes are rare enough that cross-region write latency is tolerable.
When it breaks: the write-primary region fails. Failover of a DB primary across regions is operationally hairy (promotion, split-brain protection, DNS update). Write-heavy workloads suffer if the write primary is far from the user.
Operational complexity: highest of the three. You're now operating a distributed system. Monitoring, alerting, and deploy coordination all get harder.
A CDN sits in front of everything. Static content, cacheable API responses, and heavy media are served by CDN edge nodes close to the user. Origin servers in one or two regions handle only uncacheable traffic (writes, dynamic reads that can't be cached, auth).

When it fits: 80%+ of your traffic is cacheable (static sites, read-heavy APIs, media-heavy apps). The uncacheable portion fits in one or two DCs comfortably.
When it breaks: every request is personalized (user-specific data) and can't be cached at CDN level. Writes dominate. Real-time requirements bust the CDN cache immediately.
Operational complexity: lowest of the three if your workload fits. Most of the hard work is done by the CDN. The origin can stay simple.
Single-DC apps accumulate dozens of small assumptions that break silently when you spread across regions. Seven of them hit every single multi-DC migration.
1. Sessions. If sessions are in-memory on a specific server (or sticky to one LB backend), a request routed to another region finds no session and the user is logged out. Fix: move sessions to a cross-region-accessible store (Redis with replication, or stateless JWT).
2. File uploads. User uploads a file. File lands on the local disk of the server that received the request. Next request goes to the other DC, file doesn't exist there, 404. Fix: object storage (S3-compatible: Backblaze B2, Bunny Storage, Cloudflare R2, or self-hosted MinIO with cross-region replication).
3. Application cache. Every DC has its own Redis. A cache invalidation triggered in one DC doesn't propagate to the other. Users in DC-US still see yesterday's data. Fix options: accept per-region caches with shorter TTL, or set up cross-region cache invalidation (Redis replication, or event-based invalidation via a message bus).
4. Database. The hardest one, so it gets its own section below.
5. Scheduled jobs (cron / systemd timers). A cron that cleaned up stale sessions nightly on your single server now runs independently on every server in every DC, often simultaneously, racing on the same database. Fix: leader election (etcd, Consul, Redis-based lock), or orchestrator-level cron (Kubernetes CronJob, Nomad periodic job) with only one replica.
6. Deploy pipeline. Your CI used to push to one server. Now it has to push to N servers across M regions, coordinate the rollout, handle regional failures, and roll back if one region breaks. Fix: deploy by region in sequence (canary in one, wait, then the rest), track per-region deploy status, automated rollback on health check failure.
7. Secrets. Your API keys and SSL certificates used to live in a vault accessible from one DC. Now every DC needs them. Fix: a centralized vault accessible from all regions (self-hosted Vaultwarden, or Hashicorp Vault), with the vault itself not single-DC.
If any of these seven is still a single-DC assumption after your multi-DC migration, you have a time bomb. It works until it doesn't.
Three routing approaches, each with a different operational trade-off:
GeoDNS: the DNS provider resolves your domain to different IPs based on the user's geographic location (or their resolver's location). Simple to set up, works with any backend. Trade-off: DNS is cached, so failover is as fast as the slowest ISP cache.
Providers: Route 53, Cloudflare DNS, NS1, Bunny DNS, PowerDNS with geoip plugin.
Setup pattern:
app.example.com EU-pool -> ip-eu-1, ip-eu-2 (round robin)
app.example.com US-pool -> ip-us-1, ip-us-2 (round robin)
app.example.com fallback -> all healthy IPs (if a pool is down)TTL: 60 seconds on the A records, higher on NS records. Anything above 300s on the A records makes your failover meaningless.
Anycast IP: a single IP is announced from multiple datacenters via BGP. Users' packets flow to the "closest" DC by network topology. Fast failover (BGP withdrawal takes seconds). Requires infrastructure that supports anycast, usually not a small-provider feature.
Global load balancer: a single hostname backed by a provider-managed LB (Cloudflare Load Balancing, NS1 Pulsar, Route 53 with health checks + weighted routing). The LB decides per-request which backend to route to based on health, latency, and weight. Slower failover than anycast, faster than pure DNS.
Practical recommendation for a Dedimax multi-DC setup: start with GeoDNS (lowest friction, works with any DNS provider), move to a global LB if DNS TTL caching becomes a visible failover issue, consider anycast only if you're operating at a scale that justifies the complexity.
The hardest part of multi-DC. Four realistic patterns:
One region holds the write primary. All writes go there. Read replicas in other regions handle local reads. Replication is streaming (PostgreSQL WAL, MySQL binlog, MongoDB oplog).
Trade-off: writes cross a region, adding latency. Reads are local and fast. Eventual consistency between replica and primary (usually under 1 second on good networks).
When it fits: read-heavy workloads where writes are rare and latency-tolerant. Most content sites, most blog-like apps, most read-mostly SaaS.
Multiple regions accept writes. Writes are replicated to peers asynchronously or synchronously. Conflict resolution is either database-level (CRDTs, last-write-wins) or application-level.
Trade-off: no primary bottleneck, but conflict handling adds complexity. Synchronous replication adds latency; async replication risks data loss on failover.
Databases that support this: CockroachDB, YugabyteDB, FaunaDB, PostgreSQL BDR (commercial), MongoDB with multi-primary mode.
When it fits: write-heavy workloads where cross-region write latency is unacceptable.
Different user cohorts live in different regions. EU users' data lives in EU, US users' data lives in US. The application routes requests to the shard that owns the user's data.
Trade-off: no cross-region replication needed, each shard is independent. Users traveling between regions get a slight latency hit. A user in the US can't easily share data with a user in the EU (cross-shard operations are expensive).
When it fits: data residency requirements, naturally regional user bases, large enough scale to justify the operational complexity.
The DB stays single-DC (central write). Cross-region caches (Redis replica, CDN cache with API responses, or application-level cache) absorb reads. Writes go to the central DB.
Trade-off: simplest to operate (DB stays simple), but reads that bust the cache cross a region. Can be very effective for the right workload.
When it fits: read-heavy workloads where most reads can be cached with reasonable TTLs. Smaller scale where full DB replication is overkill.
Most teams migrating to multi-DC should start with Pattern A (primary + read replicas) or Pattern D (central + cached reads), both of which are achievable without changing your database engine. Pattern B and C are architectural commitments that require database expertise and sustained engineering investment.
A single-DC CI/CD pushes to one target. Multi-DC CI/CD has to do more.
Regional rollout with canary: deploy to one region first (the smallest, or the one with the most forgiving user base). Monitor error rate and latency for 15-60 minutes. If healthy, roll to the next region. If not, stop and roll back the canary.
Simple structure in a CI tool (GitHub Actions, GitLab CI, Jenkins):
yaml
deploy_canary:
stage: deploy
script:
- deploy.sh --region=dc-eu --canary
- wait_and_check_health.sh --region=dc-eu --duration=15m
deploy_rest:
stage: deploy_production
script:
- deploy.sh --region=dc-us
- deploy.sh --region=dc-asia
needs: deploy_canaryConfiguration: shared vs per-region
Most config is shared (what the app does). Some is per-region (DB connection string, region tag, upstream service URLs). Keep shared config in one place (environment variables, config file in git) and per-region config in a region-specific overlay.
Pattern: config.yaml for shared + config.dc-eu.yaml for region-specific, merged at boot.
Health checks before marking a region ready
After deploy, the app should answer /healthz with 200. The LB or GeoDNS should route to the new version only after that check passes. Don't skip the delay: a deploy that "succeeded" but returns 500s to the first batch of users isn't a successful deploy.
Database migrations: the tricky part. A schema migration that runs against the primary DB in one region replicates to the replicas. During the migration window, the app has to handle both old and new schemas (expand-contract pattern, or feature flags for new code paths). This is more about discipline than tooling.
Single-DC observability: one Prometheus, one Grafana, one Loki, done. Multi-DC observability: one Prometheus per region (or one central that scrapes all), centralized Grafana, centralized logs with region tagging, distributed tracing if cross-DC latency matters.
Centralized logs vs per-region
Shipping logs across regions costs bandwidth (most providers, Dedimax included, charge for cross-DC egress). Realistic pattern: Loki per region, with a central Grafana that queries multiple Loki instances. Or: one central Loki with regional Promtail/Vector that ships only aggregated or error logs, not every info line.
Budget: for a mid-sized app producing 100 GB of logs/day/region, shipping all logs cross-region adds roughly €200-400/mo to your bandwidth bill. Local Loki + aggregated central is usually 10x cheaper.
Dashboards
Per-region dashboards for drill-down. One global dashboard for the executive view (total requests, error rate, p99 latency across all regions). Grafana handles this cleanly with a region variable.
Alerting
Alerts should be region-aware. "Error rate in dc-eu is 5%, dc-us is 0.1%" is a different incident than "error rate globally is 2%." Set up alerts per region plus a global alert for the sum; route to the on-call rotation that can handle regional issues.
Pattern-matched from real migrations:
1. Multi-DC without rethinking state. Teams spin up a second DC, run the same monolith stack in it, and discover sessions and uploads are broken. Fix the seven breakage points before you consider yourself multi-DC.
2. Cross-continent DB reads. The app in DC-EU happily reads from the primary DB in DC-US. 150ms per query. A page that does 20 queries is now 3 seconds slower. The DB "works" (nothing is broken), but the user experience is destroyed. Fix: read replicas in every region, or shift to Pattern D (cached reads).
3. Deploy breaks one region silently. A deploy pushes to all regions. DC-EU is healthy, DC-US gets a bad config. Half your users are now seeing 500s. Fix: canary deploys with per-region health checks; no proceeding past a failed region.
4. Secrets copied manually. You set up a vault in DC-EU. Rotated a Stripe key. Forgot to copy to DC-US. Users in the US get payment failures until someone notices. Fix: a single vault accessible from all regions, with pull-based secret delivery rather than push.
5. Pricing that assumes 2x, delivers 3x. The infra bill multiplies by 2, then egress for replication adds another €200-400/mo, then observability adds another €100-200/mo, then the engineering time to set it all up adds months. "We'll double our cost for 2x capacity" turns out to be "we tripled our cost for 1.8x capacity." Not a reason to avoid multi-DC, but a reason to plan honestly.
Phase 1: CDN in front of a single-DC origin. Cloudflare, Bunny, or Fastly. Configure caching aggressively on static assets. Measure the hit rate after a week. For most sites, this one step reduces origin load by 60-90% and improves global TTFB dramatically. Cost: €20-100/mo depending on traffic.
Phase 2: Second DC as a warm standby. Not yet serving live traffic. Primary + replicated DB + synced static files. Documented failover procedure. This matches Level 2 of the Business Continuity Plan. Cost: 1.5-2x single-DC.
Phase 3: Second DC serving live traffic. Promote the warm standby to active. GeoDNS or global LB in front. Fix the seven breakage points, verify observability across regions. Cost: 2-2.5x single-DC.
Phase 4: Optimizations. Cross-region cache replication, DB partitioning if needed, additional regions if usage patterns justify it. Cost: 3x+ single-DC.
Most small-to-mid businesses stop at Phase 1 and are happier for it. Some reach Phase 2 and declare victory. Those who go to Phase 3 do so for well-understood business reasons (traffic volume, latency SLAs, regulatory requirements), not because the architecture diagram looks impressive.
Everything above assumes same-provider multi-DC (Dedimax across its own datacenters, or any other provider across its own regions). Multi-provider adds a layer: cross-provider egress is expensive and sometimes unreliable, tooling parity is never perfect, and the operational mental load of two providers is more than 2x one provider. If you're doing it for true provider independence (regulatory or contractual reasons), budget 1.5x your multi-DC cost and 2x the engineering time, and use managed abstractions (Terraform modules per provider, centralized secrets via Vault, DNS at a neutral provider). For 95% of teams, same-provider multi-DC is the right call.
Multi-datacenter deployment solves real problems (capacity, latency, isolation), costs real money (2-3x single-DC), and requires real engineering discipline (fix the state assumptions, set up cross-region observability, rebuild the deploy pipeline). Done well, it makes your highest-traffic days unremarkable. Done sloppily, it turns every deploy into a distributed-systems debugging session.
Start with Phase 1 (CDN). Move to Phase 2 (warm standby) when the BCP conversation calls for it. Move to Phase 3 (active-active multi-DC) only when traffic, latency, or isolation genuinely demand it. On any Dedimax VPS or dedicated server, each phase is a tractable project. The hardest part is being honest with yourself about which phase your business actually needs.
Deploy your own VPS
300+ apps in one click, full root access, ready in minutes.
From 9,99€/mois
Something catastrophic happens to your infrastructure. Your production server is ransomwared. A datacenter cat...
The call comes in at the worst time. Your server isn't responding. SSH hangs. The application is down. Monitor...
Every few months, someone on r/sysadmin or Hacker News restarts the systemd timers vs cron debate. The comment...
Prenez les manettes de votre serveur dédié (configuration, données hébergées…) sans limites dans l’installation de vos applications.
Alors, vous nous rejoignez quand ?
On vous attend sur notre blog. Guides et tutoriels publiés régulièrement (sysadmin, gaming, devops...) !
ça m'interesse