Subnet replica upgrade took 10–15 minutes, not ~2 — expected? And how do you design around the window?

Title: Designing around subnet replica upgrade windows — advance notice, stateful failover, and timers

Setup. A small booking product on the IC: public website canisters serving HTML and a React bundle, and separate stateful backend canisters holding catalogue, availability and orders, talking to a payment gateway over HTTPS outcalls. Four canisters across three subnets — io67a-…-gqe and ejbmu-…-zqe (verified_application) and e66qm-…-5qe (application).

What we saw. A deploy to io67a-…-gqe failed with no_healthy_nodes, and asset requests to that canister returned {“error_type”: “subnet_updating”}. Measured from our side:

23:08:32 asset fetch OK (1,278,114 bytes)
23:16:29 503 subnet_updating
23:19:23 200, stable

So under three minutes of observed unavailability — consistent with the “around two minutes” figure in DFINITY’s own material, so nothing looks wrong here. What caught us out was everything around it.

From a visitor’s point of view the site looked up: the HTML document came from the boundary node cache and returned 200, while anything that had to reach a replica failed. A customer in that window sees a working site whose booking button does nothing.

I have read the docs on deploying to a specific subnet, so I know placement is selectable at creation with --subnet / --proxy. My questions are the ones I could not find answers for.

  1. Can an operator see it coming? Replica versions are elected and rolled out by NNS proposal, but is there anything that says this subnet, this window — a feed, an API, a status page — that we could subscribe to? Today we would learn about it from a failing deploy or a customer complaint. Is watching proposals genuinely the only signal, and how frequently does a given subnet get upgraded in practice?

  2. What do people do for a stateful backend? We can place our two backends on different subnets so one window cannot take both down — but that only works because they serve independent destinations. It is not redundancy for a single destination. Running one destination’s backend on two subnets means splitting or replicating state, each with its own failure modes, to cover a few minutes a handful of times a year. Is anyone doing that in production, or is the accepted answer to make the client retry and ride it out?

  3. And the frontend? A site canister is nearly stateless, so mirroring it on a second subnet and failing over client-side seems straightforward — except the client has to load something first in order to know to fail over, and that first thing is exactly what may be unavailable. Is there an established pattern, or does everyone rely on the boundary node cache?

  4. Do canister timers survive a subnet replica upgrade? The docs are explicit that timers are cleared on canister upgrades and must be re-armed in post_upgrade. I could not find whether a subnet replica upgrade preserves them. We use a timer to chase unconfirmed payments, so a silently dropped one means a customer charged with no booking recorded.

Happy to share more detail on any of it.

Hello @fesnavarro

A few answers to your questions:

Can an operator see it (the subnet upgrade) coming?

You can look at when the proposal is executed. The subnet upgrade happens about 1-2 epochs later. Each epoch consists of 500 blocks (4-8mins).

How frequently does a given subnet get upgraded in practice?

A new release is elected once a week and then rolled out to all the subnets.

Do canister timers survive a subnet replica upgrade?

Subnet upgrades have no impact/effects on your canister besides it being unavailable for a short moment.

Most importantly, we are currently working on improving the upgrade mechanism. Once that lands, the downtimes should be reduced to ~10s and not minutes.

Thanks, that’s exactly what I needed, especially the confirmation that subnet upgrades leave canisters untouched. That was the one that worried me, since we use a timer to chase unconfirmed payments.

Out of curiosity I pulled the execution history for our three subnets: they land Monday–Tuesday evening and Thursday ~17:00 Sydney time, which is the middle of our booking hours. European working hours, seen from Australia.

Any rough sense of when the ~10s improvement lands? Not after a date, just weeks vs quarters, so I know whether to build a retry into checkout now or wait.

Thanks again.