Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure instances and web role

Tags:

azure

What is Azure instance by the way? Is it a multiple copy of the same Azure cloud service? So for instance if I deploy a WCF application with 2 instances, the Azure creates a 2 copies of the same WCF and any requests are load balanced and distributed among the 2 instances? What is a web role in relation to an instance? Can 1 instance have 2 "web role"? Is that load balancing?

My question is basically a WCF call might do a lot of processing to return the data that user requested. What is the ideal situation to decrease the time to process a WCF web function call? Would 2 web roles in 1 instance be faster or 2 instances and 1 web role would be faster? I need to speed up the time to process each WCF web service call from the webpage. If a WCF call takes 30 seconds when set to 1 instance, would that be decreased to 15 seconds if there was 2 instances? or the 30 seconds in total will occur in 1 of the 2 instances because instance is all about load balancing?

like image 638
iefpw Avatar asked Sep 11 '12 02:09

iefpw


2 Answers

Simply put, an instance is a Virtual Machine for your application. So if you have a WCF application with 2 instances, that means there are 2 VMs on which your application is deployed and these 2 VMs are load balanced.

You could potentially deploy two web applications in a single web role. But regarding your question:

Can 1 instance have 2 "web role"? No.

Is that load balancing? No

Would 2 web roles in 1 instance be faster? Faster is rather a relative term. Think of deploying in multiple instances from high availability point of view. If you have an application deployed with 2 instances, even if 1 instance goes down, your 2nd instance will be able to serve your clients. Again each instance has limited resources (CPU/Memory etc.) this having multiple instances of the same application would allow you to process more requests as the requests are spread over multiple instances.

like image 132
Gaurav Mantri Avatar answered Sep 21 '22 13:09

Gaurav Mantri


Beside Gaurav explanation you could also check my blog post where I describe in details what is Cloud Service (formerly known as Hosted Service), what is Role and what is Instance.

If you want to go further, you can also continue and check out my other post to understand the networking principles and terminology.

like image 25
astaykov Avatar answered Sep 17 '22 13:09

astaykov