152 lines
4.1 KiB
TOML
Raw Normal View History

# Multi-Region High Availability Workspace Configuration
# Global deployment across 3 providers and 3 geographic regions
[workspace]
2026-01-12 05:18:28 +00:00
description = "High availability deployment across DigitalOcean (US), Hetzner (EU), and AWS (APAC)"
environment = "production"
2026-01-12 05:18:28 +00:00
name = "multi-region-ha"
owner = "platform-team"
# DigitalOcean Configuration - US East (Primary)
[providers.digitalocean]
default_region = "nyc3"
2026-01-12 05:18:28 +00:00
enabled = true
region_name = "us-east"
2026-01-12 05:18:28 +00:00
token_env = "DIGITALOCEAN_TOKEN"
2026-01-12 05:18:28 +00:00
[providers.digitalocean.settings]
enable_backups = true
enable_ipv6 = true
enable_monitoring = true
failover_primary = true
# Hetzner Configuration - EU Central (Secondary)
[providers.hetzner]
default_datacenter = "nbg1-dc8"
2026-01-12 05:18:28 +00:00
default_location = "nbg1"
enabled = true
region_name = "eu-central"
2026-01-12 05:18:28 +00:00
token_env = "HCLOUD_TOKEN"
2026-01-12 05:18:28 +00:00
[providers.hetzner.settings]
default_volume_format = "ext4"
enable_automount = false
failover_secondary = true
# AWS Configuration - Asia Pacific (Tertiary)
[providers.aws]
2026-01-12 05:18:28 +00:00
access_key_env = "AWS_ACCESS_KEY_ID"
enabled = true
region = "ap-southeast-1"
region_name = "asia-southeast"
2026-01-12 05:18:28 +00:00
secret_key_env = "AWS_SECRET_ACCESS_KEY"
2026-01-12 05:18:28 +00:00
[providers.aws.settings]
backup_retention_days = 30
enable_performance_insights = true
failover_tertiary = true
multi_az = true
# Global DNS Configuration
[dns]
domain = "api.example.com"
health_check_interval = 30
2026-01-12 05:18:28 +00:00
provider = "route53"
ttl = 60
2026-01-12 05:18:28 +00:00
# Regional DNS Records
[dns.regions.us_east]
endpoint = "us.api.example.com"
health_check_path = "/health"
subdomain = "us"
2026-01-12 05:18:28 +00:00
[dns.regions.eu_central]
endpoint = "eu.api.example.com"
health_check_path = "/health"
subdomain = "eu"
2026-01-12 05:18:28 +00:00
[dns.regions.asia_southeast]
endpoint = "asia.api.example.com"
health_check_path = "/health"
subdomain = "asia"
# Database Replication Configuration
[database_replication]
2026-01-12 05:18:28 +00:00
backup_retention_days = 30
max_replication_slots = 5
max_wal_senders = 5
mode = "multi-master"
primary_region = "us-east"
2026-01-12 05:18:28 +00:00
replication_lag_tolerance_seconds = 300
replication_method = "logical"
wal_level = "logical"
# VPN and Networking
[networking]
enable_vpn_tunnels = true
vpn_authentication = "sha256"
2026-01-12 05:18:28 +00:00
vpn_encryption = "aes-256"
vpn_protocol = "ipsec"
2026-01-12 05:18:28 +00:00
[networking.vpn_tunnels]
asia_to_us = { name = "asia-us-vpn", source_network = "10.2.0.0/16", destination_network = "10.0.0.0/16" }
eu_to_asia = { name = "eu-asia-vpn", source_network = "10.1.0.0/16", destination_network = "10.2.0.0/16" }
us_to_eu = { name = "us-eu-vpn", source_network = "10.0.0.0/16", destination_network = "10.1.0.0/16" }
# Deployment Settings
[deployment]
batch_size = 1
health_check_wait = 60
order = ["us-east", "eu-central", "asia-southeast"]
2026-01-12 05:18:28 +00:00
rollback_on_failure = true
strategy = "rolling"
# Regional Monitoring Settings
[monitoring]
2026-01-12 05:18:28 +00:00
alert_on_threshold_exceeded = true
enabled = true
metric_collection_interval = 60
2026-01-12 05:18:28 +00:00
[monitoring.thresholds]
cpu = 80
disk = 90
memory = 85
replication_lag = 600
2026-01-12 05:18:28 +00:00
[monitoring.alerts]
high_cpu = { condition = "cpu > 80%", action = "scale-up", severity = "warning" }
high_memory = { condition = "memory > 85%", action = "alert", severity = "warning" }
region_down = { condition = "health_check_failed", action = "failover", severity = "critical" }
replication_lag_critical = { condition = "replication_lag > 600s", action = "alert", severity = "critical" }
# Backup and Disaster Recovery
[backup]
2026-01-12 05:18:28 +00:00
compression = true
enabled = true
2026-01-12 05:18:28 +00:00
encryption = true
frequency = "daily"
retention_days = 30
2026-01-12 05:18:28 +00:00
[backup.regions]
asia_southeast = { strategy = "replica-backup", retention = "30 days" }
eu_central = { strategy = "replica-backup", retention = "30 days" }
us_east = { strategy = "automated", retention = "30 days" }
# Health Checks
[health_checks]
asia_southeast = { protocol = "HTTPS", port = 443, path = "/health", interval = 30 }
2026-01-12 05:18:28 +00:00
eu_central = { protocol = "HTTPS", port = 443, path = "/health", interval = 30 }
us_east = { protocol = "HTTPS", port = 443, path = "/health", interval = 30 }
# Cost Tracking
[cost_tracking]
budget_alert_threshold = 300
2026-01-12 05:18:28 +00:00
enabled = true
monthly_budget = 350
2026-01-12 05:18:28 +00:00
[cost_tracking.regional_budgets]
asia_southeast = 130
eu_central = 79
total_estimate = 311
us_east = 102