none
How many Web roles can I run inside a single instance RRS feed

  • Question

  • Let's assume that I am building a cloud application which has 2 asp.net mvc web site inside it. And I want to run them inside 1 small instance. Is it possible?

    I am asking because we have nearly 10 web sites which are nearly read-only web sites. So, I can put them inside a small instance and save a lot. Can I do that?

    If I can, should I publish them in one package or can I put them inside that instance one by one? (I don't think this is possible but asking it anyway). Thanks!

    Wednesday, February 1, 2012 2:25 PM

Answers

  • The multiple sites on a single role approach makes use of full IIS and host headers to help route traffic to the proper virtual directory/site. As I understand it (haven't done it myself so I can't say for 100% certainty) its works exactly the same. Just that you'd have multiple URL's all routed to the same <blah>.cloudapp.net address. Its the host header declared in the bindings that helps map what the browser requested to the virtual directory/site in IIS
    Wednesday, February 1, 2012 7:29 PM
    Moderator
  • Hi,

    The ip address you mean is your hosted service DNS name's ip address?

    such as: http://your-hostedname.cloudapp.net Right?

    This is not a real IP address, just a Virtual IP. Suppose it is a load balancer, it will deliver customers' request to actually instances automatically, the outside users cannot see these instances, but they need only access the resources via this VIP.

    Related Blogs:

    http://blogs.msdn.com/b/avkashchauhan/archive/2012/01/18/windows-azure-application-vm-and-virtual-ip-address.aspx

    Hope it can help you.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
    Thursday, February 2, 2012 3:46 AM
    Moderator
  • Hi,

    After consulting with colleagues, I deleted above reply as I misunderstood how SSL works. Sorry for that.

    Now the answer becomes not possible to use multiple SSL certificates for an Azure application. We can only have one SSL certificate per IP address (due to the way SSL works), and a Windows Azure application only has one IP address. Please seeSSL - Support for name-based virtual servers.

    Through we can only use one SSL certificate, we can put multiple domain names into a single cert to support multiple domains:

    1. If those domains are sub domains that belong to the same root domain, a wildcard certificate can be used.

    2. Use a SAN (Subject Alternative Name) certificate to support multiple domains.

    Thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Thursday, February 16, 2012 3:14 AM
    Moderator

All replies

  • What you're talking about is multiple sites per role. Yes it possible, but performance will vary largely depending on what the sites are doing. Behind the scenes, you'll simply have multiple virtual directories in IIS that map to the various sites you're hosting. A walkthrough of how to set it up can be found here.

    Wednesday, February 1, 2012 2:37 PM
    Moderator
  • Let's assume I put those 10 different web apps inside one web role and run them in two small instances. If I do that, would I still get 99.95% SLA?
    Wednesday, February 1, 2012 2:42 PM
  • Yes. Just keep in mind that the SLA covers availability of the MSFT services. If your sites are under enough load that they become unresponsive, you wouldn't be covered because your VM's are up.
    Wednesday, February 1, 2012 3:57 PM
    Moderator
  • Thansk for the answer.

    What I am wondering is that how I should configure my dns records. Let’s take the first multiple app sample on that blog post that you have referred and we would be running two sites under one role.

    In that case, what would be the dns record of http://www.litware.com? I went through the smarx’s blog post about that but I would like to know if I should take any additional step if I use multiple sites under one role.

    Wednesday, February 1, 2012 6:40 PM
  • The multiple sites on a single role approach makes use of full IIS and host headers to help route traffic to the proper virtual directory/site. As I understand it (haven't done it myself so I can't say for 100% certainty) its works exactly the same. Just that you'd have multiple URL's all routed to the same <blah>.cloudapp.net address. Its the host header declared in the bindings that helps map what the browser requested to the virtual directory/site in IIS
    Wednesday, February 1, 2012 7:29 PM
    Moderator
  • Yep, the dns record (<hostedservice>.cloudapp.net) is the one that I should set for CNAME. I have just deployed a package which has one web role and two web sites. I configured CNAME against that and it works.

    One thing is that when I ping that dns (<hostedservice>.cloudapp.net), it gives me an ip address for the USA. But I put my hosted service on West Europe. Should I do something else?

    Wednesday, February 1, 2012 9:11 PM
  • Hi,

    The ip address you mean is your hosted service DNS name's ip address?

    such as: http://your-hostedname.cloudapp.net Right?

    This is not a real IP address, just a Virtual IP. Suppose it is a load balancer, it will deliver customers' request to actually instances automatically, the outside users cannot see these instances, but they need only access the resources via this VIP.

    Related Blogs:

    http://blogs.msdn.com/b/avkashchauhan/archive/2012/01/18/windows-azure-application-vm-and-virtual-ip-address.aspx

    Hope it can help you.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
    Thursday, February 2, 2012 3:46 AM
    Moderator
  • Ok, now it brings up another question.

    Assuming I will put multiple websites under one web role with SSL encryption. In order for SSL to work, I should give each website under IIS a different IP address AFAIK (or not?).

    How does windows azure handle this?


    • Edited by tgbrkug Thursday, February 2, 2012 8:31 AM
    Thursday, February 2, 2012 8:30 AM
  • Hi,

    After consulting with colleagues, I deleted above reply as I misunderstood how SSL works. Sorry for that.

    Now the answer becomes not possible to use multiple SSL certificates for an Azure application. We can only have one SSL certificate per IP address (due to the way SSL works), and a Windows Azure application only has one IP address. Please seeSSL - Support for name-based virtual servers.

    Through we can only use one SSL certificate, we can put multiple domain names into a single cert to support multiple domains:

    1. If those domains are sub domains that belong to the same root domain, a wildcard certificate can be used.

    2. Use a SAN (Subject Alternative Name) certificate to support multiple domains.

    Thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Thursday, February 16, 2012 3:14 AM
    Moderator