You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to use this module but was wondering if this shutsdown and kills the open connections or if it indicates if there are still open connections waiting for answers (say from the database). That would let me write a script that would check if the app is fully in maintenance mode before I kill the database or such.
The text was updated successfully, but these errors were encountered:
hey alexander, thanks for answering. it certainly would be great if maintenance could do that!
One method I could imagine would be to wrap res.send etc. (or maybe only res.end, since that should be called everytime at the end) and apply a counter for incoming/finished requests. If maintenance goes on, it stops accepting connections (telling the load-balancer to back off -> or just redirects all traffic to the maintenance page) starts a timer and waits till timer executes or incoming/finished hits 0. It then sends off a curl to a rest interface or sets a redis variable that its now in maintenance. If all nodes are in maintenance, it kicks off a further rest-interface/sets a redis variable/publishes and we can start our database etc. update.
or as an alternative would be to let one get the maintenance status of a node via rest. then one would implement the logic of the "am i in maintenance"-mode in the upgrade-script.
I like to use this module but was wondering if this shutsdown and kills the open connections or if it indicates if there are still open connections waiting for answers (say from the database). That would let me write a script that would check if the app is fully in maintenance mode before I kill the database or such.
The text was updated successfully, but these errors were encountered: