Kestrel webserver for Asp.Net Core - does it recycle / reload after some time

假如想象 提交于 2020-02-23 09:13:06

问题


Simple noob question :-)

I'm about to go into production with a small .NET core app host that's hosted in a droplet at digitalocean. I've always hosted websites using IIS, but I would like to move to linux distributions and use nginx as reverse proxy.

My question is as the title says :-) Does kestrel every need to recycle a "application pool" like the IIS does? If not, does that mean the application is loaded from Kestrel is online until it's shut down?

Best regards Jens


回答1:


Based on bits of information here and there from watching all the http://live.asp.net Community Standup meetings I'd so no, Kestrel does not recycle itself the way IIS does.

The reason for this is that Kestrel currently has no way to restart itself if it stops. That's one of the many reasons why it's important to put it behind some sort of reverse proxy like IIS or nginx. This kind of process lifetime management functionality must currently come from a software layer outside of Kestrel. If Kestrel dies due to a software bug or other reason and there is no reverse proxy or other process to restart it, it will not restart by itself and the website will be stay down.

For additional information, this article talks about Publishing to a Linux Production Environment and includes an example nginx system service file that has Restart=always https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction



来源:https://stackoverflow.com/questions/43097551/kestrel-webserver-for-asp-net-core-does-it-recycle-reload-after-some-time

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