From Azure to a European multi-cloud in a month: migrating 51Degrees Cloud to Hetzner and OVHcloud
Service: cloud.51degrees.com, a globally distributed, latency-sensitive real-time API
Timeline: August - September 2026 (production traffic on the new fleet from 24 August)
Stack: OpenTofu (Terraform), pyinfra, Podman, systemd, nftables, Hetzner Cloud, OVHcloud Public Cloud, VictoriaMetrics, VictoriaLogs, VictoriaTraces, OpenTelemetry, Grafana, GitHub Actions
At a glance
More capacity and resilience for less money. Monthly hosting cost fell by around 30%. The headline number undersells it: the new fleet runs more instances, in more than twice as many regions, across two independent providers - a far more resilient setup than the Azure one it replaced.
4 Azure regions -> 9 data-centre regions on 2 European providers, grouped into four served regions: EU, UK, US and Asia Pacific. Three of the four keep serving even if an entire provider goes down.
New product capability unlocked. TLS now terminates inside the application, so the service can read TLS and HTTP/2 handshake signals (JA4 fingerprinting) - impossible behind Azure's managed front end.
Zero-downtime releases with automatic rollback on every server.
Vendor-neutral observability on OpenTelemetry and the VictoriaMetrics stack, owned by the client, replacing Azure Application Insights.
About four weeks from the first line of infrastructure code to production traffic.
Why move
- Capability. 51Degrees' new context and probabilistic identification features rely on signals from the TLS handshake itself. Azure App Service terminates TLS before traffic reaches the application, so those signals never arrive.
- Cost. Azure is expensive compared with independent European providers.
- Sovereignty. 51Degrees wanted to reduce dependence on US hyperscalers ("EuroStack") and to be able to offer customers a jurisdiction guarantee. Hetzner and OVHcloud are both European-controlled.
Before and after
| Before (Azure) | After (Hetzner + OVHcloud) | |
|---|---|---|
| Compute | Azure App Service | Linux VMs running containers under Podman |
| Footprint | 4 regions, 1 provider | 9 regions, 2 providers, at least two servers in each |
| TLS | Terminated by Azure ahead of the app | Terminated by the application itself |
| Releases | App Service slot swap | Blue/green swap on each server, health-gated |
| Infrastructure | Managed in the cloud portal | Fully codified in OpenTofu, every change reviewed |
| Scaling | App Service plan | Metrics-driven autoscaling per region |
| Telemetry | Application Insights | OpenTelemetry -> Victoria stack + Grafana |
Architecture
-
Every region is an independent unit
Each provider region has its own network, load balancer, storage and servers, described in OpenTofu with separate state. A change, or a failure, can only ever affect one region at a time, and no region runs on a single server.
-
Simple, hardened hosts
Each server is a minimal Linux install running the service as a Podman container managed by systemd. It is configured automatically on first boot, firewalled with nftables to expose only what the service needs, and ships its own metrics to the monitoring stack.
-
TLS in the application
The load balancers pass encrypted traffic straight through to the application, which terminates TLS itself. To keep the real client IP visible behind the balancer, we added PROXY protocol support to the .NET (Kestrel) server, which has none built in. The same code works with both providers' load balancers.
-
Releases that cannot take a region down
Each server can run the old and the new version side by side; traffic moves to the new one only after it passes a health check, and stays on the old one if it does not. Rolling back takes seconds. Releases are rolled out with pyinfra and run automatically every day from GitHub Actions, region by region.
-
Reviewed infrastructure changes
Infrastructure is changed only through a plan-then-apply workflow in GitHub Actions: a human reviews the plan, and exactly that plan is applied.
-
Autoscaling, kept simple
A lightweight autoscaler watches load in each region and adjusts its server count through OpenTofu. There is no Kubernetes, and that was a deliberate trade-off: for a single stateless service it removes an entire control plane from the operating cost.
-
Observability the client owns
The application pushes metrics, logs and traces over OpenTelemetry to a self-hosted stack: VictoriaMetrics, VictoriaLogs, VictoriaTraces and Grafana. Traces are sampled intelligently, so every error and slow request is kept while routine traffic is thinned out. The stack accepts only authenticated traffic and sits behind a firewall. Dashboards and alerting cover availability, latency, errors and host health, and are versioned in git.
Performance after the migration
How it went
Late July - early August: foundations
First OpenTofu configuration for both providers. In parallel, the application gained in-container TLS, PROXY protocol support, a deep health check, and OpenTelemetry export that could run alongside Application Insights during cutover. A staging environment and its observability stack went live, so every piece was proven there before production.
Mid-August: automation
Plan/apply workflows, pyinfra deployments, trace sampling, the autoscaler and the first Grafana dashboards.
19 - 24 August: cutover
Infrastructure, observability and runbooks merged, followed by a few days of production hardening. From 24 August production was served from the new fleet, with Azure running in parallel under the existing global traffic routing.
September: hardening and reuse
Safer staged deployments, and support for a second domain. One region with provider network issues was swapped for another without customer impact. The same blueprint was then reused to move the 51Degrees website, the Configurator and the usage Collector.
Lessons learned
- Keep the traffic layer, move what is under it. Leaving global routing in place let regions join one by one, with an instant fallback.
- Managed load balancers differ in the details. Making the application tolerant of those differences, instead of tuning each balancer, kept one codebase for both providers.
- Measure before you silence. Fleet-wide telemetry showed most error logs were harmless connection-teardown noise. Filtering them was a data-backed decision, which made real errors stand out.
- Simple beats fashionable for a single service. OpenTofu, pyinfra, systemd and nftables are boring, well understood and easy to debug at 3 a.m.