Azure Deployment IDs and URLs

We have a Windows Azure Cloud Service with two instances per deployment. Currently, the deployments are hooked up like this:

Deployment ID a1a1... is in the production slot.

Deployment ID b2b2... is in the staging slot.

The Web Roles in these deployments have a status page, which can be reached like this:

http://a1a1... .cloudapp.net/status
http://b2b2... .cloudapp.net/status

On this status page we are displaying, among other things, the deployment ID, which we look up programmatically like this:

if (Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.IsAvailable)
{
    return Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.DeploymentId;
}

The strange thing is that this status page displays the deployment ID b2b2... , no matter which of the two URLs we are invoking.

Shouldn't http://a1a1... .cloudapp.net/status be displaying a1a1... as the deployment ID?

Btw: Our domain http://www.ourdomain.com/status shows the correct deployment ID a1a1... .


Have you done a VIP swap to swap your production and staging services? There are a few reasons why you might be hitting this, but if you have done a VIP swap then I would say the most likely is that your requests to the 2 different URLs are actually going to the same hosted service. This is typically caused by TCP connections staying open between the client and the server after the VIP swap, which means that HTTP requests will continue to be sent over that same TCP connection.

The first thing I would do to troubleshoot this is to RDP to both services and check the IIS logs to see if the requests are going to the same service.

链接地址: http://www.djcxy.com/p/68490.html

上一篇: 使用独特的Sql Azure connectionStrings打包并发布Azure Cloud Service

下一篇: Azure部署ID和URL