Azure Web Apps : How to access specific instance directly via URL?

自闭症网瘾萝莉.ら 提交于 2019-12-03 12:42:37

问题


We have deployed our Sitecore CMS on to Azure Web Apps and having some indexing issues or similar. i.e. the updated changes is reflected for some users and not for all.

We have a scale turned on to 2.

I would like to troubleshoot by accessing the instance 1 and 2 directly via URL to make sure both instances have index built 100%.

How do I access each Azure Web Role instances directly via URL?

Thanks.


回答1:


The first step is to get the list of instance names. There is an Azure API for it, which you can easily invoke using Resource Explorer (https://resources.azure.com/). Use these steps:

  • In Resource Explorer, find your Web App (in the tree or using search box)
  • Under the app, click on Instances, which gives you an array of instances. Each instance has a long name like 622e6b27f9077701f23789e5e512844d22a7dfdd29261bc226f65cd000e2d94a

Once you have the instance names, you can add a cookie in your requests to aim at a specific instance by setting the ARRAffinity cookie to that value. e.g.

ARRAffinity=622e6b27f9077701f23789e5e512844d22a7dfdd29261bc226f65cd000e2d94a

You can do it using a tool like curl. Or I like to use the EditThisCookie Chrome extension (link), which lets you set it from the browser.

In fact, you'll find that after hitting the page normally from the browser, you'll already get an ARRAffinity, as it's used for session stickiness. But the Chrome extension lets you change it and aim at other instances.

See also related blog post: http://blog.amitapple.com/post/2014/03/access-specific-instance/



来源:https://stackoverflow.com/questions/34833120/azure-web-apps-how-to-access-specific-instance-directly-via-url

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