provisioning/docs/src/examples/multi-cloud.md
2026-01-17 03:58:28 +00:00

1.2 KiB

Multi-Cloud Examples

Deploy infrastructure across multiple cloud providers for redundancy and geographic distribution.

Primary-Backup Configuration

UpCloud primary in Europe, AWS backup in US:

{
  servers = [
    # Primary (UpCloud EU)
    {name = "web-eu", provider = 'upcloud, zone = "fi-hel1", plan = 'medium},
    {name = "db-eu", provider = 'upcloud, zone = "fi-hel1", plan = 'large},

    # Backup (AWS US)
    {name = "web-us", provider = 'aws, zone = "us-east-1a", plan = 't3.medium},
    {name = "db-us", provider = 'aws, zone = "us-east-1a", plan = 'm5.large},
  ],

  replication = {
    enabled = true,
    pairs = [
      {primary = "db-eu", standby = "db-us", mode = 'async}
    ]
  }
}

Geographic Distribution

Deploy to multiple regions for low latency:

{
  servers = [
    {name = "web-eu", provider = 'upcloud, zone = "fi-hel1"},
    {name = "web-us", provider = 'aws, zone = "us-west-2a"},
    {name = "web-asia", provider = 'aws, zone = "ap-southeast-1a"},
  ],

  load_balancing = {
    global = true,
    geo_routing = true
  }
}

References