.net - Windows Azure,解决实例和粘性 session

标签 .net azure cloud azure-web-roles azure-configuration

为了概念验证论文,我收集了有关 Windows Azure 的事实。还有 2 个主题我找不到明确的答案。

  1. 粘性 session /粘性负载平衡是不可能的,对吗?也许在 Azure 流量管理器 (WATM) 的帮助下有可能?

  2. 可以解决部署的单个实例吗?或者它们都在 Azure 的不透明墙后面吗?或者至少,实例可以在运行时确定自己的 id 或类似的内容,以便将其写入日志吗?

最佳答案

请在下面找到答案:

  1. Sticky sessions/sticky load balancing is not possible, am I right? Maybe there is a possibility with the help of Azure traffic Manager (WATM)?

你是对的。与 Windows Azure 之间没有粘性 session 。不,您不能使用流量管理器来帮助您提高粘性。流量管理器只会帮助您在角色之间分配负载,而不会帮助您在实例之间分配负载。请区分角色和实例。看看this question有关角色和实例的更多信息。

2. Can single instances of a deployment be addressed, or are they all behind this non-transparent wall of Azure? Or at least, can an instance at runtime determine its own id or something like that in order to write it into a log?

您无法寻址特定实例。所有这些都位于 Windows Azure 负载均衡器和防火墙后面。但您可以从代码中发现您当前的角色实例。使用CurrentRoleInstance RoleEnvironment的属性(property)类(class)。这将是 RoleInstance 类型的对象,其中有 ID属性。

关于.net - Windows Azure,解决实例和粘性 session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8224461/

相关文章:

c# - 为什么将基类型实例转换为派生类型对象/引用不是类型安全的

c# - 如何在运行时创建包含类的 dll?

azure - 如何获取用于资源组部署的最新 Azure 库模板?

azure - Web 部署到 Azure 失败 "Could not create SSL/TLS secure channel"

c# - Topshelf 中托管的 WCF 服务需要很长时间才能关闭

.net - .Net WebClient 类中的curl -u 等效项

Azure AD 阻止添加 HTTP 回复 URL

java - 在 AsyncTask 中使用 ListenableFuture Azure 调用

node.js - 谷歌云健康检查失败

分布式环境(云)中的 PHP XDebug