gpt4 book ai didi

azure - Azure 中的网站更新是否会重置应用程序池?

转载 作者:行者123 更新时间:2023-12-01 09:27:07 25 4
gpt4 key购买 nike

将网站更新推送到 Azure 时,应用程序池是否会重置?这对登录网站的用户有何影响?用户会退出吗?

最佳答案

When pushing a website update to Azure does the app pool reset?

是的。您可以在Kudu Debug Console中检查这一点,在 Process Explorer 下。请注意您的应用程序的 PID 如何变化。

What effects does this have to a user that is signed into the site? Would the user get signed out?

使用 Azure AD 登录(我假设是因为您没有提及 IdP)在很大程度上取决于您的 token 缓存策略:

假设您仅将内存缓存用于 ADAL/MSAL 并且您的应用池重新启动 -

在这种情况下,STS 和 ASP.NET cookie 仍在浏览器 session 中,您的代码需要检查缓存,如果它看起来像新缓存,redirect user to STS (Challenge() in ASP.NET) 。这将是无缝的,并且不需要输入凭据,因为 STS cookie 从未消失。

如果用户 session 状态也存储在内存中(ASP.NET 的默认设置),那么您也会丢失用户的 session 状态(如果其中包含购物车,则需要担心更大的问题)。

明智的做法是迁移到持久 token 缓存和持久用户 session 存储。 Redis缓存是一个不错的选择。 SQL 也很好,可能有点多。

关于azure - Azure 中的网站更新是否会重置应用程序池?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48023904/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com