|
From: Krzysztof B. <kb...@un...> - 2025-09-17 11:20:18
|
Hi Laura, W dniu 17.09.2025 o 11:09, Laura Hofer pisze: > Hi Krzysztof, Hi Roman, > > we are currently planning to switch our Unity setup to an HA setup > with one master and two workers. > This raised the question of how best to proceed with Unity updates: Do > all Unity instances have to be stopped and updated at the same time, > or can the instances be updated gradually (e.g. within a few hours)? > Could the second option cause problems with the database if, for > example, the master is already running a newer version of Unity, but > the workers are still running an older version? Newer Unity can not work on older DB - actually at the startup it will try to update DB schema. That said, if you want to have close-to-zero downtime deployment blue-green sounds as the proper approach. 0. Blue is running old version (and can have HA, e.g. 3 instance) 1. install the new version on Green 2. (critical; see notes below) stop Blue, clone DB from Blue to Green 3. start the stack on Green 4. switch routing to Green 5. deprovision Blue In this scheme #2 is critical, this is when your downtime starts (ends at #4). Typically such short downtime is OK: that should take few minutes, and in case of troubles with new installation rollback is immediate - you just start Blue again. But we can do better here: instead of fully stopping Unity, we can have a feature to put it into RO mode. This would require some development and precise definition (note: in Unity even a simple new sign-in is a write operation from DB standpoint), but could help a lot: e.g. existing sessions/tokens could be serviced w/o interruptions. But that would require a new feature. HTH, Krzysztof |