简体   繁体   English

唯一标识VM实例(Azure ML-Web服务)

[英]Uniquely identify instances of VMs (Azure ML - web services)

I'm posting this more as a 'probe' question and plan to expand the discussion in case some interest shows up. 我将其更多地发布为“探针”问题,并计划扩大讨论范围,以防万一。 The reason behind this is that in my experience, the SO community on azure-ml (and related) is still developing and there is not much feedback - but I would be happy to help it grow stronger. 这背后的原因是,根据我的经验,关于azure-ml (及相关)的SO社区仍在发展,反馈不多-但是我很乐意帮助它变得更强大。

My situation is as follows: I have an experiment in Azure ML which does all its work inside an R module. 我的情况如下:我在Azure ML中进行了一个实验,该实验在R模块中完成了所有工作。 I published this as a web service and set the 'max concurrent calls' slider to 10 - which I believe guarantees me that there will be at most 10 instances of my web service up and running at any time, to serve requests (please correct me if i am wrong). 我将此发布为Web服务,并将“最大并发调用数”滑块设置为10-我相信这可以保证我随时可以运行并运行最多10个Web服务实例(请更正我)如果我错了)。

Now, I am trying to do some performance testing by firing 10 parallel calls to my webservice, but get unexpected results... 现在,我试图通过触发10个对我的Web服务的并行调用来进行一些性能测试,但是得到了意外的结果...

I am trying to run the load tests and log where each of them actually goes to (which instance). 我正在尝试运行负载测试并记录它们实际到达的位置(哪个实例)。 My idea is to get a glimpse into how these calls are actually distributed to the instances by the load balancer, under certain max number of concurrent calls = X. I am doing this by firing a call to "bot.whatismyipaddress.com" from inside the R script. 我的想法是了解在某些最大并发调用数= X下,负载均衡器如何将这些调用实际分配给实例。我是通过从内部触发对“ bot.whatismyipaddress.com”的调用来实现的R脚本。 Here is the important snip of the code: 这是代码的重要片段:

library(rjson)
machine.ip <- readLines("http://bot.whatismyipaddress.com/", warn=F)
result$MachineIP <- machine.ip

Additionally, I am using the sample R code from the web service RRS help page to fire up to 70 (sequential) calls to my web service. 此外,我正在使用Web服务RRS帮助页面中的示例R代码来触发对我的Web服务的多达70个(顺序)调用。 This sample code returns some info back to the console : the results of my web service as well as some info on to which hostname the call goes through. 此示例代码将一些信息返回到控制台:我的Web服务的结果以及有关呼叫通过的主机名的一些信息。 Here is a sample : 这是一个示例:

* Hostname was NOT found in DNS cache
*   Trying 40.114.242.9...
* Connected to europewest.services.azureml.net (40.114.242.9) port 443 (#0)

The difficulty that I am facing is that I cannot uniquely identify the different instances of my web service. 我面临的困难是我无法唯一地标识 Web服务的不同实例。 The info out to console from the call (the second snippet) often shows a different IP address than the one from inside- R -code logs ( result$MachineIP )... 从呼叫到控制台的信息输出(第二个片段)通常显示与内部R代码日志( result$MachineIP )不同的IP地址...

Can someone point out what am i doing wrong, and how could i uniquely identify the different instances that are serving the calls? 有人可以指出我做错了什么,如何才能唯一标识正在处理呼叫的不同实例? Any help would be really appreciated. 任何帮助将非常感激。 Thanks! 谢谢!

PS I've tried this as well, but the first apporach does not work when calling it from inside the R script and I'm using a modified version of the second apporach (the one suggested there does not work). PS我也尝试过方法,但是从R脚本内部调用第一个方法时,第一个方法不起作用,而我正在使用第二个方法的修改版(建议那里的方法不起作用)。 Here are also my questions on the Azure forum, in case someone is interested. 如果有人感兴趣, 也是我在Azure论坛上的问题

If anyone could help or point me to some source of info I would be really grateful! 如果有人可以帮助或指出一些信息来源,我将不胜感激!

This question was resolved thanks to some people on the Azure ML forum so I'm going to post an answer for anyone landing here in search for some answers... 感谢Azure ML论坛上的一些人,此问题得以解决,因此,我将为在此登陆的任何人发布答案以寻找一些答案...

The short answer is no, this is not possible. 简短的答案是不,这是不可能的。 The more detailed version is: 更详细的版本是:
"From within the R script you cannot identify the internal AzureML IP addresses or the unique web service instances. When you make an external network call from the R script to an outside URL, that URL will see one of the AzureML public virtual IP's as the source IP. These are IP's of the load balancers, and not of the machines that are physically running the web service. AzureML dynamically allocates the instances of R engine in the backend, handles failures, and uses multiple nodes for running the web service for high availability. The exact layout of these for a given web service is not programmatically discoverable." “从R脚本中,您无法识别内部AzureML IP地址或唯一的Web服务实例。当您从R脚本到外部URL进行外部网络调用时,该URL将其中一个AzureML公共虚拟IP视为源IP,这些是负载平衡器的IP,而不是物理上运行Web服务的计算机的IP AzureML动态地在后端分配R引擎的实例,处理故障,并使用多个节点来运行Web服务,对于给定的Web服务,这些的确切布局无法通过编程方式发现。”
Here is also the link to the original discussion. 这也是原始讨论的链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM