Start typing to search across invoices, services, domains, tickets, and more...
The practical way to make a cross-border business survive a data-center, network or subsea-cable failure is multi-region disaster recovery: run production in Hong Kong, keep a continuously replicated warm standby in Tokyo, Singapore or Taipei, and switch traffic with short-TTL DNS or Anycast. IMIDC provides every piece of this from one account: Hong Kong CN2 GIA servers for the primary, Japan, Taiwan and Singapore servers for the standby, and BGP/Anycast announcement of your own IP block.
Takeaway: three locations that fail independently beat two identical servers in one building.
DROP TABLE or ransomware.| Standby location | Why choose it | Watch out for |
|---|---|---|
| Tokyo, Japan | Short hop from Hong Kong, strong Pacific connectivity, CN2 route option on Japan VPS for China-facing traffic | Shares some Hong Kong–Japan cable corridors; check path diversity with mtr |
| Singapore | Different cable landing region, good for Southeast Asian users | Configured via IMIDC sales rather than the self-service store |
| Taipei, Taiwan | Very close to Hong Kong, Taiwan native IPs, dedicated from $199/mo | Shares the Luzon Strait area exposure with Hong Kong for some routes |
Takeaway: decide how much data you can lose (RPO) and how long you can be down (RTO) before you buy anything.
| Tier | What runs in the standby region | Typical RPO | Typical RTO | Relative cost |
|---|---|---|---|---|
| 0 – Backup only | Nothing; restic snapshots in a vault | Up to 24 h | Hours to a day (rebuild) | Lowest |
| 1 – Pilot light | Small VPS with a live database replica | Seconds to minutes | 30–60 min (scale up, start apps) | Low |
| 2 – Warm standby | Right-sized server, replica + idle app stack | Seconds | 5–15 min (promote + DNS) | Medium |
| 3 – Active/active Anycast | Both regions serve traffic, own /24 via BGP | Seconds (app-dependent) | Minutes, often automatic | Highest, most complex |
These numbers are design targets from real-world setups, not promises; measure your own during drills. Many shops start at Tier 1 with an IMIDC Japan VPS as the pilot light and move to Tier 2 once revenue justifies it.
Takeaway: use asynchronous, TLS-encrypted replication across regions; synchronous commits over 30–60 ms links slow every write.
# /etc/mysql/mysql.conf.d/dr.cnf (Hong Kong primary: server_id=1, Tokyo standby: server_id=2)
[mysqld]
server_id = 1
log_bin = mysql-bin
binlog_format = ROW
gtid_mode = ON
enforce_gtid_consistency = ON
binlog_expire_logs_seconds = 604800
-- On the Hong Kong primary (203.0.113.10)
CREATE USER 'repl'@'198.51.100.20' IDENTIFIED BY 'change-me' REQUIRE SSL;
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'198.51.100.20';
-- On the Tokyo standby (198.51.100.20), MySQL 8.0.23+, after loading a consistent dump
CHANGE REPLICATION SOURCE TO
SOURCE_HOST='203.0.113.10', SOURCE_USER='repl', SOURCE_PASSWORD='change-me',
SOURCE_AUTO_POSITION=1, SOURCE_SSL=1;
START REPLICA;
SET GLOBAL super_read_only = ON;
SHOW REPLICA STATUS\G -- watch Seconds_Behind_Source
# Primary (Hong Kong): pg_hba.conf
hostssl replication replicator 198.51.100.20/32 scram-sha-256
# Standby (Tokyo): clone the primary and start streaming
sudo systemctl stop postgresql
sudo -u postgres rm -rf /var/lib/postgresql/16/main/*
sudo -u postgres pg_basebackup -h 203.0.113.10 -U replicator \
-D /var/lib/postgresql/16/main -R -X stream -C -S tokyo_slot -P
sudo systemctl start postgresql
# On the primary: check replication lag
sudo -u postgres psql -c "SELECT client_addr, state, replay_lag FROM pg_stat_replication;"
Restrict the replication port (3306 or 5432) to the standby IP in your firewall, keep replicas read-only, and alert when lag exceeds your RPO (for example Seconds_Behind_Source above 60 or replay_lag above one minute).
Takeaway: rsync keeps the standby current; restic keeps history you can roll back to.
# Nightly snapshot of files + DB dumps to a third location
export RESTIC_REPOSITORY=sftp:[email protected]:/srv/restic/hk-app
export RESTIC_PASSWORD_FILE=/root/.restic-pass
restic init # first run only
mysqldump --single-transaction --all-databases | gzip > /var/backups/db.sql.gz
restic backup /var/www /etc /var/backups --exclude-caches
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune
restic check --read-data-subset=5%
# Every 5 minutes: mirror user uploads to the Tokyo standby
*/5 * * * * rsync -aH --delete -e "ssh -i /root/.ssh/dr_ed25519" /var/www/uploads/ [email protected]:/var/www/uploads/
Because rsync --delete mirrors deletions too, never treat the mirror as a backup. Run a monthly test restore of one snapshot onto a scratch VPS and record how long it takes: that is your real Tier 0 RTO.
Takeaway: DNS failover is cheap and simple; Anycast with your own /24 removes the DNS cache delay but needs an ASN and BGP skills.
; Zone for example.com - keep the failover record on a short TTL
www.example.com. 60 IN A 203.0.113.10 ; Hong Kong primary
; standby target -> 198.51.100.20 ; Tokyo warm standby
# Health check from a third location (cron every minute)
#!/bin/sh
if ! curl -fsS --max-time 5 https://www.example.com/healthz >/dev/null; then
echo "$(date -u) primary check failed" >> /var/log/dr-check.log
# after 3 consecutive failures: alert on-call, then switch the A record
# via your DNS provider's API (manual approval recommended)
fi
Lower the TTL to 60 seconds at least a day before you need it. Some resolvers and apps cache longer, so expect a tail of traffic on the old IP for several minutes. Promote the database first, then flip DNS:
# PostgreSQL standby -> primary
sudo -u postgres psql -c "SELECT pg_promote();"
# MySQL standby -> primary
mysql -e "STOP REPLICA; RESET REPLICA ALL; SET GLOBAL super_read_only=OFF; SET GLOBAL read_only=OFF;"
If you hold your own /24 (or lease one from IMIDC) and an ASN, IMIDC can set up BGP sessions in Hong Kong and Tokyo. Announce the prefix normally from Hong Kong and with AS-path prepending from Tokyo; when Hong Kong goes down or you withdraw the route, the internet converges to Tokyo while clients keep the same IP. Create a ROA for both origins first.
# BIRD 2 on the Tokyo standby: announce your own /24, made less preferred
protocol bgp imidc_tokyo {
local as 64500; # your ASN
neighbor 198.51.100.1 as 64501; # session details provided by IMIDC
ipv4 {
import none;
export filter {
if net = 203.0.113.0/24 then {
bgp_path.prepend(64500); bgp_path.prepend(64500);
accept;
}
reject;
};
};
}
# Failover drill: stop the Hong Kong session -> birdc disable imidc_hk
Takeaway: plan for degraded routes, not just dead servers. Earthquakes, ship anchors and regional incidents have damaged several Asian and Asia–Europe cables at once in the past (for example the 2006 Hengchun earthquake off Taiwan and the 2024 Red Sea cable cuts).
| Scenario | Symptom | Response |
|---|---|---|
| Hong Kong–Japan/US capacity cut | High latency and loss for overseas users; mainland China users still fine via CN2 | Shift international traffic to Tokyo or Singapore (GeoDNS or Anycast), keep China traffic on Hong Kong |
| Asia–Europe cuts | European customers see slow checkout | Serve static assets through a CDN, keep the standby in a region with different westbound cables |
| Full Hong Kong site loss | Primary unreachable | Promote standby, switch DNS or withdraw Hong Kong BGP route |
| Logical disaster (bad deploy, ransomware) | Both regions corrupted via replication | Restore from restic snapshot; replication does not help here |
Use mtr from both sites to customer regions during normal times so you know what a good path looks like before an incident.
Takeaway: an untested standby is a hope, not a plan.
Takeaway: match the tier to the business impact of an hour offline.
Need Singapore, a mixed VPS/dedicated layout or help moving existing servers? IMIDC sales can build custom configurations, and free migration is available.
IMIDC operates data centers in Hong Kong, Tokyo, Singapore and Taipei, so the primary and standby can be ordered and supported under one account. Hong Kong uses the China Telecom CN2 GIA route, and Singapore is configured through sales.
DNS failover works with any IP and is easy to operate, but caches delay the switch by a minute to several minutes. Anycast with your own /24 keeps the same IP and converges via BGP, but you need an ASN, ROAs and BGP knowledge; IMIDC can provide the BGP sessions and lease IPv4 space.
No. Replication copies deletions and corruption to the standby within seconds. Keep versioned, encrypted snapshots (for example restic) in a third location and test restores regularly.
Far enough not to share a power grid, building or typhoon path, and ideally different cable landings. Hong Kong with Tokyo or Singapore is a common pairing; check real paths with mtr before deciding.
Start with the Hong Kong dedicated servers or Hong Kong CN2 GIA VPS for the primary and a Japan VPS or Taiwan dedicated server for the standby. For Anycast with your own IPs see BGP/Anycast, and for Singapore or a custom DR design contact IMIDC sales or open a ticket.