pereztr5 / cyboard

Scoring engine for cyber defense competitions
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Live config reloading #8

Closed tbutts closed 7 years ago

tbutts commented 7 years ago

A great deal of our maintenance could be cut down if the application performed hot reloading of service check config options, checks.toml. This way, when the user updates the checks that should run, the server does not need to be restarted, instead, it just becomes aware of the new state it should be guided under.

The config lib we use, viper, supports this easily. Just be sure to avoid nasty race-condition scenarios, by preventing the vars the config is watching for from being reloaded in the middle of E.G. a round of service checks.


I don't believe this is possible to do for our web server options, config.toml, at least not in a way that does not interrupt service. Even if done programmatically, the server would still have to restart itself to do something like bind to a different interface or port for hosting.

tbutts commented 7 years ago

Closed between: 10e20f125255cfec05c14d0ab67ffda2f8980f1e , accfa1bbd9bf8de475d3a65b719248bd9a48d555 , and bf69b4b8313229cee231324fdb9bead1d9aeddb4