Upgrades¶
The server is stateless, so a restart is cheap: clients reconnect and re-register. The constraint is the protocol. Snodra ships one protocol version with no negotiation, and a server and a client of different builds are not supported. Plan upgrades around that sentence.
Within one release train¶
When the protocol package is unchanged, a rolling restart works:
- Run at least two servers, and point every service at all of them
(
static://server-1:7000,server-2:7000). - Drain and upgrade one server at a time. On
SIGTERMit sets health toNOT_SERVING, closes its streams withUNAVAILABLEand drains for up to 5 seconds. Clients fail in-flight requests on that server, retry on the other one where the policy allows it, and reconnect. - Upgrade services in any order. Each new instance registers with the same types; a re-register with the same instance id replaces the old session.
- Watch
snodra_hub_connected_instances,snodra_hub_registered_typesand the clients'snodra_hub_client_connected_hubsuntil every instance is back on every server.
Roll back by running the previous tag. The server stores nothing, so there is no schema to reverse there.
Across a protocol change¶
A release that changes the gRPC package is a coordinated window: the server and every client must move together. There is no mixed-version mode and no negotiation. Upgrade the server and all services in the same window, then confirm registration.
Stores and schema¶
- MongoDB: the library writes explicit documents and creates TTL indexes at startup. No migration is needed between the Kotlin and Rust libraries.
- SQL: the schema is versioned and applied at startup when
init-schemais true; a service that runs its own migration sets it tofalseand the startup checks the version. A schema change is a data migration, not an automatic one. - Event stores: events and their record layout are stable across releases. Check the broker's retention before a long maintenance window.
Before you start¶
- Read the release notes and the compatibility page.
- Pin image tags and artifact versions; do not deploy
latestby accident. - Export the current dashboards and record the metric names, so a changed instrument is easy to spot after the upgrade.
- Keep the previous image and the previous client artifact available for rollback.