asp.net mvc - Clever way to put azure MVC app into maintenance mode -
does have quick , clever ways flip mvc app running on windows azure "maintenace mode"
i don't have huge need because use azure staging environment lot have need make sure there no users in production instance of application (mainly database updates).
i'd able on fly without uploading new code or swapping deployment slots. suggestions?
the friendliest way on login. when user authenticates, check maintenance mode flag in database , don't let them log in. let active users continue use application until log out or session times out. keep activity log can know when users have expired.
of course means take time when put app maintenance mode , when ready, it's not nice boot out active user.
if usage pattern of app makes methodology not ensure no activity in reasonable time, can add timeout on top of this. check same maintenance flag request every often. doesn't have every request every 5 minutes or so. if necessary can cache maintenance mode value locally reasonable period of time (a few minutes).
Comments
Post a Comment