Cloud Zone is brought to you in partnership with:

Wely is developer, architect, trainer, consultant, technical writer, and technology lover. With the grant of ASEAN Graduate Scholarship, Wely obtained his Master of Science (Information Systems) from Nanyang Technological University. He’s currently working as “Cloud” Solutions Architect in the largest System Integrator in Singapore. Architecting cloud solution, designing and developing cloud project, and delivering cloud training are his daily activities as part of driving the adoption of Cloud Computing, specifically on Windows Azure platform. In spare time, he writes blog, delivers presentation, and participates in online community. His passion in driving Microsoft technologies especially Windows Azure made him to be awarded the first Windows Azure MVP in Southeast Asia. Wely is a DZone MVB and is not an employee of DZone and has posted 19 posts at DZone. You can read more from them at their website. View Full User Profile

Preserving Static IP Address in Windows Azure

03.05.2013
| 10024 views |
  • submit to reddit

It is a pretty common practice to use an IP address to provide access on whitelisting service. As an example a trading partner Contoso only allows my company Northwind to access their web service. Only the predefined IP address will be accepted by Contoso while others will be denied.

a

The question now is: Am I able to preserve the IP address of my Windows Azure application in the cloud environment? This article is to explain how to preserve a static IP address for both PaaS and IaaS.

While there is internal IP address being assigned to each VM, this article emphasizes on public VIP (virtual IP address). We don’t really care about the internal IP address since it’s invisible to external parties.

PaaS: Web and Worker Role

In PaaS, the IP address is assigned on the deployment (either production or staging) of our service package. The IP address will be stay static through the lifecycle of service deployment. As of today, there’s no way to reserve an IP address outside the lifetime of the deployment:

“Windows Azure currently does not support a customer reserving a VIP outside of the lifetime of a deployment.”

The following diagram illustrates how the deployment looks like:

b

You won’t lose your IP address

  • Operations including in-place upgrade, VIP swap, and scaling will not make you to lose your public IP address.
  • Fortunately, you will also never lose your IP Address in any case of hardware failure recovery.

You will lose your IP address

  • When you delete a deployment of a cloud service, you will lose the IP address. Windows Azure will assign you another new public IP address on the new deployment.

Thus, please be reminded that do not delete the deployment if you want your IP address to be persisted. You should always consider using in-place upgrade or VIP swap to keep the public VIP.

IaaS: Virtual Machine

There is only production deployment in IaaS Virtual Machine. The IP address is assigned when a VM attached to an empty cloud service.

c  d

The left hand side of the following figure shows the assignment of a public VIP when VM 1 is being created. The right hand side of the figure shows that there isn’t any IP address change when a new VM attached to the existing cloud service.

You won’t lose your IP address

  • Operations including vertical scale (changing size of VM) and adding new VM to cloud service will not make you to lose your public IP address.
  • Likewise PaaS, you will also never lose your IP Address in any case of hardware failure recovery.

You will lose your IP address

  • When there isn’t any VM attached to a cloud service, you will lose the IP address. This can be shown with the following figure.

e

What if you really need to delete a VM but you don’t want to lose the public VIP? The workaround is to deploy a “dummy” VM for a time being until the new deployment is done. This will ensure that your public VIP will be retained.

Conclusion

To conclude, this article explains under certain circumstances, you will lose or will not lose the public VIP of your Windows Azure service. It also covers both PaaS and IaaS on how they differs each other on deployment management. Hope this gives you better insight on managing your Windows Azure public VIP.

 

Published at DZone with permission of Wely Lau, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)