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

杀马特。学长 韩版系。学妹 提交于 2019-12-03 03:01:49

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/

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