!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture

218 Members
Discussions about Nixpkgs' architecture - https://github.com/NixOS/nixpkgs/labels/architecture45 Servers

Load older messages


SenderMessageTime
20 Jun 2023
@raitobezarius:matrix.orgraitobezariusdo M10:34:12
@raitobezarius:matrix.orgraitobezariusit's safe because you don't lose data, you only availability10:34:31
@raitobezarius:matrix.orgraitobezarius * it's safe because you don't lose data, you only lose availability10:34:36
@raitobezarius:matrix.orgraitobezariusyou can go back to version N - 1 by restoring S as long as you don't create new data of course which should be fine if you have a broken service resulting of an unsafe migration10:35:01
@raitobezarius:matrix.orgraitobezarius * take a data snapshot of the service you are migrating S10:35:08
@raitobezarius:matrix.orgraitobezariusyou could automate restoring S based on criteria: "the systemd unit really doesn't want to restart", "all requests are 500", etc.10:35:30
@raitobezarius:matrix.orgraitobezariusavailability then can be restored via this mechanism10:35:51
@piegames:matrix.org@piegames:matrix.orgYeah but how do you want to take a snapshot of only a single service? And what about services that interact with others (e.g. a database)?10:36:05
@raitobezarius:matrix.orgraitobezariusideally, the nixos module should provide the facts about your servicesd10:36:27
@raitobezarius:matrix.orgraitobezarius * ideally, the nixos module should provide the facts about your services10:36:28
@raitobezarius:matrix.orgraitobezariusStateDirectory10:36:31
@raitobezarius:matrix.orgraitobezariuspostgresql database10:36:36
@raitobezarius:matrix.orgraitobezariusredis database10:36:40
@raitobezarius:matrix.orgraitobezariusetc.10:36:42
@raitobezarius:matrix.orgraitobezariusthen "taking a snapshot" for the service is taking a snapshot of all its constitutents10:36:52
@raitobezarius:matrix.orgraitobezariusand this is an implem detail on how you take such snapshots10:36:59
@piegames:matrix.org@piegames:matrix.orgSo you have three services connecting to postgres, and one of them fails during upgrade. That's not an implementation detail, that's a fundamental problem IMO10:37:15
@raitobezarius:matrix.orgraitobezariusyou can take diff snapshots using the filesystem features if this makes sense, you can take application level snapshots if it's possible10:37:18
@raitobezarius:matrix.orgraitobezarius
In reply to @piegames:matrix.org
So you have three services connecting to postgres, and one of them fails during upgrade. That's not an implementation detail, that's a fundamental problem IMO
taking a PGSQL database snapshot without affecting the other is a requirement
10:37:45
@raitobezarius:matrix.orgraitobezariusok let's define it further10:37:52
@raitobezarius:matrix.orgraitobezariuswe have services in nixpkgs which are shared with different applications living on the same machine10:38:04
@raitobezarius:matrix.orgraitobezariuslet's say that the rollback/snapshot granularity is at the database level for PGSQL (and similar things)10:38:29
@raitobezarius:matrix.orgraitobezarius3 services get upgraded, are using 1 database each, one of them fails during upgrade10:38:38
@raitobezarius:matrix.orgraitobezariusyou rollback the failed upgrade's database10:38:44
@raitobezarius:matrix.orgraitobezariusnot the others one10:38:47
@raitobezarius:matrix.orgraitobezariusexcept if you go further and you say that this group of 3 services needs to be coupled and then if you look at the systemd dependencies graph, you want to rollback every database10:39:19
@raitobezarius:matrix.orgraitobezarius(network dependencies are hard to discover but I don't think they're impossible to build)10:39:50
@raitobezarius:matrix.orgraitobezariusthe way you take snapshots though is impl detail because you could use all kind of techniques which can be better depending on your exact situation10:40:14
@raitobezarius:matrix.orgraitobezariussystem snapshot, filesystem-level snapshots, ZFS dataset-level snapshots, application-level snapshots, "backup/restore procedures"10:40:42
@ronnypfannschmidt:matrix.org@ronnypfannschmidt:matrix.orgmigrations as such need ot be kind of managed as involved service groups that may or may not share required rollbacks for full safety you need service deployment granularity that enables migrations in steps where both older and newer versons currently avaliable can work with the data in question maintenance modes for the applications that can happen independ of the code deployment are going to be important as well so starting points like "having restorable backups" are definitively nice to have but applications themselfes also need some extras11:55:24

Show newer messages


Back to Room ListRoom Version: 9