加载单独的实例 [英] loading seperate instances

查看:74
本文介绍了加载单独的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行2个实例的Web应用程序.我的应用程序具有管理界面,可以清除应用程序缓存.当然,它只清除正在其上运行的实例的缓存.因此,我需要能够强制我的浏览器拉起其他浏览器 实例,以便我可以在那里清除缓存.我可以在我的主机文件中做些什么使一个输入直接指向一个实例,另一个指向另一个实例?还是您有其他建议?

I have a web app running with 2 instances. My application has an admin interface the I can clear the application cache. Of course, it only clears the cache for the instance it is running on. So, I need the ability to force my browser to pull up the other instance so I can clear cache there. Would there be anything I can do in my hosts file to have one enter pointed directly to one instance and another to the other? Or do you have a different recommendation?

推荐答案

When you create an app in App Service, it is put into an App Service plan. When the app runs, it runs on all the VM instances configured in the App Service plan. If multiple apps are in the same App Service plan, they all share the same VM instances. If you have multiple deployment slots for an app, all deployment slots also run on the same VM instances. If you enable diagnostic logs, perform backups, or run WebJobs, they also use CPU cycles and memory on these VM instances.

通过这种方式,App Service plan是App Service应用程序的比例单位.如果计划配置为运行五个VM实例,则所有应用程序在 该计划在所有五个实例上运行.如果将计划配置为自动缩放,则计划中的所有应用将根据自动缩放设置一起缩放.

In this way, the App Service plan is the scale unit of the App Service apps. If the plan is configured to run five VM instances, then all apps in the plan run on all five instances. If the plan is configured for autoscaling, then all apps in the plan are scaled out together based on the autoscale settings.

 

主目录包含应用程序的内容,应用程序代码可以对其进行写入.如果一个应用程序在多个实例上运行, 主目录 在所有实例之间共享,以便所有 实例看到相同的目录.因此,例如,如果应用程序将上传的文件保存到主目录,则这些文件可立即用于所有实例.

The home directory contains an app's content, and application code can write to it. If an app runs on multiple instances, the home directory is shared among all instances so that all instances see the same directory. So, for example, if an app saves uploaded files to the home directory, those files are immediately available to all instances.

 

此外,Azure应用服务允许您通过动态添加Web服务器实例来处理您的Web应用的流量,从而自动扩展您的Web应用. Azure应用服务使用应用程序请求路由" IIS扩展在服务内容的活动实例之间分配连接用户.

Further, Azure app service allows you to auto scale your web app by dynamically adding web server instances to handle the traffic to your web app. Azure app service uses Application Request Routing IIS Extension to distribute your connecting users between your active instances serving up the content. 

 

在某些情况下,不需要亲和力.例如,如果您收到来自单个用户的太多请求,并且 发送到同一Web服务器实例的请求可能会使它超载.  如果保持会话关联性并不重要,并且您想要更好的负载平衡,则可以禁用会话关联性Cookie.推荐这个博客 为Azure Web应用禁用会话亲缘关系cookie(ARR cookie) 了解更多详细信息.

There are situations where in keeping the affinity is not desired. For example, if you are getting way too many requests from a single user and the requests going to the same web server instance can overload it.  If maintaining session affinity is not important and you want better load balancing, you could disable session affinity cookie. Refer this blog Disable Session affinity cookie (ARR cookie) for Azure web apps for more details.

------ -------------------------------------------------- -------------------------------------------------- ------

如果此答案有帮助,请单击标记为答案"或投票.要提供有关您的论坛体验的其他反馈,请单击 >

If this answer was helpful, click "Mark as Answer" or Up-Vote. To provide additional feedback on your forum experience, click here


这篇关于加载单独的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆