The node manager is a component of the Internet Computer that manages the replica.
Among other things, it continuously determines the correct Replica binary to run for this node at any point in time, runs this binary, and monitors this process (e.g. restarting it if it exits unexpectedly)
The node manager also triggers upgrades of the replica process. For that, it periodically performs the following operations:
Ask the registry for the current peers in the subnetwork it is suposed to run it.
From each peer, fetch the latest catch-up package via a separate CUP endpoint.
Verify each of those CUPs (by means of the subnet signature) and select the most recent one (based on the block height).
Check the registry version referenced in that CUP and the replica version associated with that registry version.
If the version is different from what we are currently running, apply upgrade and restart replica with that CUP.
The node manager also fetches configuration updates from the registry and writes them to disk for other components of the system to read.