Reputation: 11
I have three different webroles in my azure solution. They are all deployed to xyz.cloudapp.net:
webrole 1 at port 81
webrole 2 at port 82
webrole 3 at port 83
For accessing webrole 2, I need url xyz.cloudapp.net:82. I have noticed that the ports in the url get blocked by some firewalls so I want to get rid of the port.
What is the best method to exclude the need for ports in the url?
Upvotes: 0
Views: 488
Reputation: 2116
Actually you can also use a single web role with multiple instances. Then the work load will be evenly distributed to those instances. If you have a single code base, the best choice is to use a single web role with multiple instances. They can use a single port 80 on the load balancer. If you have different requirements for different applications, then please multiple roles. In this case you can either host them in different hosted services (so they use different domain names but can use the same port), or host them in the same hosted service as knighpfhor pointed out.
Best Regards,
Ming Xu.
Upvotes: 0
Reputation: 9399
A couple of options. The easiest way is to change your web roles so they're each have their own service/deployment. This would mean that you could run them all on port 80 and they'd have their own url e.g. xyz.cloudapp.net, xyztwo.cloudapp.net, xyzthree.cloudapp.net. It has the side effect that it is easier to deploy each of them separately.
If you have a domain that you're using for your app e.g. xzy.com then you could setup all three of the web roles to be sites under one web role using host headers to distinguish between them. Then you could add CNAMEs for www.xyz.com, two.xyz.com, three.xyz.com all to point to xyz.cloudapp.net.
Upvotes: 0
Reputation: 1611
Take a look at:
http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
http://channel9.msdn.com/Shows/Cloud+Cover/Cloud-Cover-Episode-37-Multiple-Websites-in-a-Web-Role
You should be able to do it with host headers and CNAME mappings. But not sure if you can with the cloudapp.net URL.
Upvotes: 1