Is it possible to smoothly “hot deploy” an ASP.NET Core app?

若如初见. 提交于 2021-01-26 14:45:43

问题


Under ASP.NET with .NET Framework, you can perform a "hot deploy" of new code without disruption. This works because IIS can juggle multiple app domains for the same application: when new code arrives it "drain stops" the old app domain, allowing it to finish requests while simultaneously the new app domain starts up and starts serving new requests.

My question is: is there any parallel to this in ASP.NET Core with Kestrel? If so, what?


回答1:


Kestrel doesn't have this built in like IIS does. Think about it: Kestrel binds directly to port 80. You have to start a new Kestrel process to update your code. Those processes can't share port 80 and there is no way to hand it off from one process to the other without a reverse proxy in front of both.

You could use a load balancer in front of your webservers. Then do a rolling update or a blue-green deployment.



来源:https://stackoverflow.com/questions/55503897/is-it-possible-to-smoothly-hot-deploy-an-asp-net-core-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!