Configuration reloading #7

Open
opened 2022-07-30 22:21:11 +00:00 by jcgruenhage · 0 comments
Owner

While implementing #4, I realised that it's kinda related to config reloading, so I dove down into that whole rabbit hole. Turns out: That's not trivial, not even close to it. But if I already start with it for the DNS stuff, I might as well restructure peshming in general to support reloading it's configuration when receiving SIGHUP.

Areas that can get picked up automatically by changing global state:

  • changes to existing ping targets
  • stopping of removed ping targets

Areas that need to be actively changed:

  • spawning new ping targets
  • changing the port we listen on (requires stopping hyper server and starting a new one)

Things that can't be changed without a restart:

  • Any logging config, including the level
  • Any metrics config, including the buckets

With those limitations (and probably either way), I'm pretty sure it's not really worth it to implement config reloading, but I'll do it anyway for educational purposes.

While implementing #4, I realised that it's kinda related to config reloading, so I dove down into that whole rabbit hole. Turns out: That's not trivial, not even close to it. But if I already start with it for the DNS stuff, I might as well restructure peshming in general to support reloading it's configuration when receiving SIGHUP. #### Areas that can get picked up automatically by changing global state: - changes to existing ping targets - stopping of removed ping targets #### Areas that need to be actively changed: - spawning new ping targets - changing the port we listen on (requires stopping hyper server and starting a new one) #### Things that can't be changed without a restart: - Any logging config, including the level - Any metrics config, including the buckets With those limitations (and probably either way), I'm pretty sure it's not really worth it to implement config reloading, but I'll do it anyway for educational purposes.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jcgruenhage/peshming#7
No description provided.