Incus cluster across 3 sites at just over 10ms latency | Is it possible?

Setup
I’m designing an Incus cluster across 3 OVH sites: Gravelines, Roubaix and Strasbourg. I have gotten very far with setting things up but when I did a latency test I found out that I’m just outside supported range.

Measured latency over OVH’s private network (vRack), 6 hours, ICMP every 100 ms (216,000 samples per direction):

Pair Median p99 p99.9 Loss
Gravelines–Roubaix 2.0 ms 5.1 ms 12–22 ms ≤0.01%
Gravelines–Strasbourg 10.2 ms 11.1–11.5 ms 15–20 ms 0%
Roubaix–Strasbourg 9.7 ms 12.4–13.0 ms 18–33 ms ≤0.01%

Rare single spikes of 110–514 ms occur a few times per six hours (probably just caused by cheap small shared-vCPU cloud VMs). The numbers are very flat hour to hour. The real nodes will be dedicated servers, which I haven’t been able to measure yet as those have high setup fees but I would expect very similar response times.

Workload
The cluster would not have many moving parts. It would host a handful of VMs, mainly the nodes of a Kubernetes cluster, which does its own HA across the sites. The main reason I want an Incus cluster rather than standalone nodes is the single management UI and API. I don’t rely on Incus for VM failover (yet, but also not a hard requirement).

The problem
The clustering docs say latency between members must not exceed 10 ms, and that the database and heartbeats aren’t supported over higher-latency links. Strasbourg’s median sits right at that line (9.7–10.2 ms), and its p99 is 1–3 ms over.

Questions

  1. Is the 10 ms figure a hard technical limit, such as Raft election or heartbeat timers, or a tested support boundary? Does it refer to the median, the worst case, or something else?
  2. If I ran at ~10 ms median with p99 of 11–13 ms anyway, what actually breaks or degrades: slower API calls only, or also leader elections, members flapping offline, or cluster instability (under load)?
  3. Are there settings that make this reliable, such as cluster.offline_threshold or anything on the database side? Or is the answer simply “not supported at this latency”?
  4. Is there a better supported topology for three sites at this distance, for example separate clusters per site, or standalone servers managed through incus remote? If so, can they be managed through a single UI?

Incus version: [latest].

I had similar setup, And even small latency like 10ms caused simple incus operations to hang. Finally i decided that having single management was not worth the issues that latency and timeouts were causing me.
3 node cluster that you are considering would loose quorum when 1 node is down, that makes management of other nodes very inconvenient if not impossible.

For your use case managing config of 3 nodes via Terraform sounds like much better idea. That what I am running now.

Hi. Assuming this is a single server at each site, I can see the want for a cluster. I have found that one doesn’t always need one because trusts and the client/API are powerful enough. @kriszos suggestion to use IaC in place is a good suggestion, which makes it easier to send things like profiles, configs etc to all 3 servers, and you have your single management tool you want.

In the client you just have trusted “remotes” so you can do things like:

  • copy/move servers, snapshots and profiles to other servers in one command
  • exec into servers in the client by either prefixing the server name with the remote: name, or switch to that remote in the client if doing a lot of work on a particular server.

I ship a lot of data on schedule from small multi-server clusters to a site-local stand-alones via these commands/API for quick site-local backups. The same for remote longer-term off-site backups, but a different off-site stand-alone. At first I was trying to join them to the cluster but they didn’t need to be since the client/API makes things so simple. Different scenario but maybe like me you might not need a cluster if it’s risking stability and integrity.

Unless you have shared storage between the nodes (which seems unlikely over a WAN) then you don’t really get any benefit from clustering. Indeed it will reduce your availability - things will stop working if a site cannot contact at least one other site. Furthermore, upgrades must be made lock-step, and you can freeze yourself out if one of the upgrades stalls or fails.

Three separate nodes don’t have these problems. You can still copy/move instances between nodes very easily (incus copy site1:instance site2:), including with incremental updates (--refresh) on supported storage pools like zfs.

Isn’t the main issue with raft quorum though? Wouldn’t setting up a “control plane” in one zone and connecting them to instance hosts on other zones viable (i.e. non-voting members)?

You’d still have to be careful with OVN though if that’s used. If uplink is host-local, it should be fine. Although I’ve not tried it.

Thanks all, this is really useful.

@kriszos, thanks for sharing. This is exactly what I was afraid of, but at least now I know my original design isn’t feasible. @mratt, @candlerb, thanks for the points on remotes, incus copy --refresh and lockstep upgrades.

@gael, interesting idea, and I seriously considered something similar when I initially noticed the latency issue. Part of my intended design was to split the cluster over multiple zones for HA/redundancy, so putting all voting members in one zone wasn’t really an option. What I looked into instead was setting up a smaller voting node in, e.g., London or Paris, and making the big Strasbourg “worker” a non-voting member. Basically, the idea was to split the Strasbourg node into a voting member within the latency limits and a non-voting “worker” node, which would be the original bare-metal compute server. However, I opted against it because it adds complexity, and I like the elegance of having every server configured essentially identically. (The big bare-metal “worker” servers I am looking to rent aren’t available in Paris or London.)

What I’ve already built is full IaC: every node is declared in git, so pushing profiles and config to each server fits naturally. Without shared storage, a cluster mainly buys me a single management view. The downsides you describe (upgrade lockstep, availability when a site is cut off) are a good counterpoint, and good reasons for me to reconsider a single cluster regardless of feasibility. After the feedback above, I now plan to run each node as an independent Incus instance and use remotes for copies and moves between them when needed.

I do still think a single UI for several independent servers would be nice to have. Right now incus webui <remote> covers one server at a time. The closest I’ve found is lxconsole, which manages multiple Incus and LXD servers from one web interface. It still carries a beta badge, which makes me hesitant to run it for anything in production. Has anyone here used it, or does anyone know of another option for managing several independent servers from one place?

GitHub - turtle0x1/LxdMosaic: Web interface to manage multiple instance of lxd/incus · GitHub will manage different hosts + clusters (self plug, haven’t tagged i along time but I do push from master from time to time, unfrotuently its a little outdated with all the modern auth systems and has its own and various other drawbacks, but an option if your looking for that kind of thing Incus/LXD it works fine)