2
votes

Could someone please help me understand following related Azure VIP?

  1. Does Production Slot VIP gets changed when we do VIP SWAP?
  2. Does new deployment changes VIP?
  3. On what sort of scenarios does the VIP changes?
  4. If I delete the Staging Slot and redeploy and perform VIP swap then will it generate new VIP?

Thank you

3

3 Answers

5
votes

Does Production Slot VIP gets changed when we do VIP SWAP?

When a customer swaps the VIP between a stage and production deployment in a single hosted service, both deployment VIPs are persisted.

Does new deployment changes VIP?

Throughout the lifetime of a deployment, the VIP assigned will not change, regardless of the operations on the deployment, including updates, reboots, and reimaging the OS.

On what sort of scenarios does the VIP changes?

When a deployment is deleted, the VIP associated with that deployment will return to the pool and be re-assigned accordingly, even if the hosted service is not deleted.

If I delete the Staging Slot and redeploy and perform VIP swap then will it generate new VIP?

Since Staging is also a deployment, I think deletion of Staging Slot would return your VIP to pool. However, this one is my idea, never tried it.

Source

4
votes

1.Does Production Slot VIP gets changed when we do VIP SWAP?

No. The VIP associated with production stays the same. If it did change, your site would appear to go down while the updated DNS information propagated through the Internet. Instead, the Production VIP is remapped to the instances currently in the Staging environment (and vice versa for the Staging VIP).

2.Does new deployment changes VIP?

If by "new deployment" you mean deploying new bits to either the production or staging environments, no, this does not change their VIP.

3.On what sort of scenarios does the VIP changes?

The only time the VIP for an environment changes is if you delete the current deployment for that environment. The confirmation message when you try to delete states that the VIP will be lost.

4.If I delete the Staging Slot and redeploy and perform VIP swap then will it generate new VIP?

You will lose the current VIP for the Staging environment when you delete it. You will get a new VIP when you redeploy to it. After that, performing a VIP swap or deploying new bits to either environment will have no effect on their VIP.

Hope that helps!

3
votes

"Swap VIP" doesn't change VIPs, it swaps the deployments unchanged, so the xxx.cloudapp.net URL now points to the VIP of previously staging (and now production) deployment and RandomGuid.cloudapp.net now points to the VIP of previously production (now staging) deployment. The swap only affects the URL->VIP mapping, nothing else, VIPs themselves are preserved.

When you delete a deployment its VIP is reclaimed by Azure. When you create a new deployment it may reuse that previously reclaimed VIP or get a new one - that's unspecified. Until you delete a deployment its VIP is preserved.

So...

If I delete the Staging Slot and redeploy and perform VIP swap then will it generate new VIP?

Once you delete the staging deployment its VIP is reclaimed by Azure. When you create a new staging deployment it will reuse that VIP or get a new one. Meanwhile the production deployment preserves its VIP. Then you do the swap - production becomes staging and staging becomes production and they still preserve their VIPs.

For example. You have production with VIP 1.1.1.1 and staging with VIP 2.2.2.2. So yourapp.cloudapp.net points to 1.1.1.1 You delete and recreate the staging and it happens to now have VIP 3.3.3.3 (it could just as well get 2.2.2.2 again - you can't predict that). The production still has 1.1.1.1 - that's guaranteed. You do the swap - now the VIP with 3.3.3.3 becomes production and VIP with 1.1.1.1 becomes staging so that yourapp.cloudapp.net now points to 3.3.3.3 They preserve their VIPs during the swap, only URL->VIP mapping changes.