đ 18 May 2024
System downtime is rarely something that is met with smiles and laughter, least of all when youâre deploying an application - yet âacceptedâ downtime is surprisingly commonplace among enterprise software companies! While itâs true that modern tooling like Kubernetes and managed services like Azure App Service have made zero downtime deployments all but trivial, many companies do not have these options readily available to them.
So⌠youâre probably reading this because youâre one of the lucky folks who deploy your .NET applications to IIS. You may have already read some blogs about how to achieve zero downtime deployment with blue/green deployments, server farms, and a scattering of PowerShell scripts which got you thinking âhmm⌠that seems like a decent chunk of work and maintenance overhead, maybe another timeâ. Well fear no more, because as of April 2024 we have an far simpler option involving just two steps!
<aspNetCore processPath="dotnet" arguments="your_application.dll" stdoutLogEnabled="false" stdoutLogFile=".logs_stdout">
<handlerSettings>
<!-- This is the golden ticket: -->
<handlerSetting name="shutdownDelay" value="1000" />
</handlerSettings>
</aspNetCore>
Easy! If you want some additional context or to dig deeper into why this wasnât an option before then check out the links below: