Tuesday 28 April 2020

Is there a solution for storing a few global variables that can be updated during runtime and will keep their value even after server restart?

So I know that the title making it sounds like "yeah use a DB", but I use MySQL and I don't think that creating an entire table just to have a single row in it is the best solution... also as I explain in the next line the variable will affect the functionality of the server and it's not a good idea to pull the variable from the DB every time before using it (just so that the server will always use the newest values)So the variables that I need to store basically can be defined by me or any one of the other admins (non-dev guys) through our admin console (built with React, not that it really matters), and the variables will affect a lot of stuff during runtime and if a variable is being updated then it should keep its new value even if the server restarts...Also I want the solution to support multiple processes (when load balancing) so all the processes will use the newly updated variables...

Submitted April 28, 2020 at 08:02AM by s_trader

No comments:

Post a Comment