Click here to Skip to main content
15,867,568 members
Articles / Web Development / ASP.NET

Azure FAQ Part 1

Rate me:
Please Sign up or sign in to vote.
4.90/5 (81 votes)
3 Mar 2014CPOL15 min read 184.2K   149   23
Azure FAQ Part 1

Article Updated 1:- Simple 5 steps to run your first Azure program 2:- Simple 7 steps to run your first Azure Blob Program 3:- 7 simple steps to run your first Azure Queue program 4:- 9 simple steps to run your first Azure Table Program 5:- Simple 6 Steps to Run your First Azure Worker Role Program.

In case you want to refer step by step Azure learning material along with this complete article , here is the video which we have recorded for the same, - Video1.

Windows Azure FAQ Part 1

Introduction and Goal

My other Azure Faq Articles

Thanks , Thanks and Thanks

This does not look like a technical article?

What problem does Windows Azure solve?

How is billing and costing done in Windows Azure services?

We are still not clear with the payment model it looks a bit confusing?

What is Fabric?

Where does our application run?

What is a fabric controller?

What are roles, web role and worker role?

So is it that worker role cannot connect to external systems outside Azure?

Is it that every web and worker role is hosted in their own virtual machines?

How do the web role instance and worker role instance communicate with fabric?

What are blobs, tables and Queues?

So is SQL is the standard way to query blobs, tables and queues?

Why was not SQL preferred?

Why one more data storage when we already have SQL Server?

How do web role and work role communicate with each other?

What is a fault domain?

References

 

Introduction and Goal

Different people have different obsessions and I have this stupid obsession of writing articles in FAQ formats :-) . The more I try to write articles in normal format I end up with a FAQ. My only thought process of writing articles in FAQ format is that we end up talking to the point rather than talking about trees and rivers , many may disagree.

Carrying my obsession one more step ahead Windows Azure FAQ part I.

My other Azure Faq Articles

  1. Simple 5 steps to run your first Azure program
    Simple5stepsAzure_.aspx
  2. Simple 7 steps to run your first Azure Blob Program
    Azue7StepsBlob.aspx
  3. 7 simple steps to run your first Azure Queue program
    7simpleAzure.aspx
  4. 9 simple steps to run your first Azure Table Program
    http://www.codeproject.com/KB/aspnet/9SimplestepsAzure.aspx
  5. Simple 6 Steps to Run your First Azure Worker Role Program
    http://www.codeproject.com/KB/aspnet/6StepsAzure.aspx

Thanks , Thanks and Thanks

I am really blessed to be part of Lionbridge SaaS team, the knowledge they brought within me about SaaS is incredible. I would not be writing this article if I was not the part of the team. Here’s nice article from the same team on SaaS http://www.lionbridge.com/lionbridge/en-US/kc/product-engineering/configurability-in-saas.htm .

The article by Modesty zhang really inspired me to write this article, here’s a reference http://www.codeproject.com/KB/silverlight/Azurelight.aspx , thanks for bringing the Azure interest in me.

This does not look like a technical article?

At the initial stages of FAQ we will get acquainted to general vocabularies of Azure and then we will start with all programming stuff.

Quote: - Windows Azure is not a technological change, it’s a business change: - Shivprasad koirala (taking some space to glorify myself J )

If you really ask me Azure is 20% technological driven and 80 % business driven. So if you or your organization is thinking of migrating to Azure, the decision will be management driven rather than technology driven. So the initial stage of the article will talk about cost and need to use azure which will be a bit boring. As this FAQ series moves ahead you will see lot of samples codes, architecture thought process and all the technical blah blah.
I am sure as technological person you need to be aware of how to convince the management when you want to implement a new technology.

What problem does Windows Azure solve?

The best way to define Azure is by understanding what problem it solves. So let’s take a typical organization that has a separate IT department maintaining an online web application. Now let’s try to analyze which different cost factors are involved in maintaining a web application online.

We can divide IT department cost in to four broader sections:-
Hardware cost: - If you want to host your web application you would need servers, routers etc to run your application.

Software licensing cost: - When you make your application you will need to purchase server OS license like windows 2003 server, visual studio licenses, SQL server licenses etc.

Hosting cost: - You also need to deploy your web application on internet. For that you will need to host your web application on some hosting service. One of the biggest costs in hosting service is bandwidth. So we need to budget for the same.

IT personnel salary: - Nothing can be run without humans. So we also need IT personnel’s to do development and maintenance of code and infrastructure.

In other words there is a considerable cost attached to run an IT department. Many of these costs need to be paid up front.

Image 1

The upfront cost can be solved if we can get a provider who can host a shared service which provides shared server hardware, shared software license cost and can provide pay per use bandwidth. The provider can maintain a team of IT personnel’s who can maintain the infrastructure. If the provider services not one but many organization using this shared service it can bring down the cost considerably.

So in other words the model changes something as shown below. So the provider moves all the hardware and software on a centralized location and the applications of the respective organization are hosted in this shared environment. Using this model organizations do not need to pay upfront for the hardware, software and IT personnel costs.

Image 2

In one line to define Windows Azure, Microsoft is the provider and windows azure is the shared hosting service.

Microsoft has provided his own datacenters where they have hosted software's like SQL services,.NET services,Sharepoint services,Microsoft dynamic services and live services. Microsoft azure provides a cloud environment for running your web application and storing data. Its like visualizing windows services available on cloud.

Image 3

Courtesy: - The above image is taken from the white paper
An Introduction to Microsoft® .NET Services for Developers: - The .NET framework for the cloud by Aaron Skonnard, Pluralsight. You can read the white paper from http://go.microsoft.com/fwlink/?LinkID=150833 .

Isn’t it friends, sharing cuts down cost J

Image 4

How is billing and costing done in Windows Azure services?

As discussed above there are two types of cost one is the fixed cost (server hardware, employee salary etc) and other is the variable cost (bandwidth usage, hosting storage space etc).

Windows Azure services are billed using pay and use model. Microsoft terms this as consumption based model. In other words the customer does not need to pay anything upfront, everything is paid as per consumption.

The pay and use model is defined by four characteristics:-

Compute / Hour: - Depending on how much computing power your application uses you will be charged. When I wrote this article it was $0.12 / hour.

Storage in GB / month: - Storage is measured in units of average daily amount of data stored (in GB) over a monthly period. The storage cost currently is 0.15$ / GB stored for the whole month. Let’s try to understand the above statement. If you store 30 GB for a day then the average comes to 1 GB per month. If you stored 30 GB for 30 days then average come to 30 GB per month. Below are the calculation details :-

Image 5

Figure :- Storage calculation details

• Bandwidth: - One more factor which is used to measure cost is bandwidth, in other words how much data goes in and out from the data centre. We will discuss on the bandwidth cost in more detail later because this has lot of variations depending on the services provided by Azure. Please note bandwidth used within data centre is free.
• Storage Transactions: - Any kind of add, update and delete on the storage data is also tracked. Currently it’s billed at $0.01 for 10,000 (10k) transaction requests.

The charges mentioned in this article can be obsolete as time passes by, for recent rate card please visit http://www.microsoft.com/azure/pricing.mspx

We are still not clear with the payment model it looks a bit confusing?

There are three parts to the Azure payment model:-

Metering: - This defines the unit of measurement. For example compute per hour, storage per GB, bandwidth per GB and transactions per 10k.

Billing: - This defines the dollar amount for the unit.

Services: - Both metering and billing needs to be associated with a service like .NET service, SQL Service, Live services etc.

Image 6

The charges mentioned in this article can be obsolete as time passes by, for recent rate card please visit http://www.microsoft.com/azure/pricing.mspx

  Windows Azure SQL Azure .Net services
Bandwidth IN $0.10 / GB $0.10 / GB $0.10 / GB
Bandwidth OUT $0.15 / GB $0.15 / GB $0.15 / GB
Storage $0.15/GB stored/Month NA NA
Transactions $0.10/10000 K NA NA
Messages NA NA $0.15/100K message.


A note of SQL Server cost


Web Edition – Up to 1 GB relational database = $9.99 / month
Business Edition – Up to 10 GB relational database = $99.99 / month

What is Fabric?

Before we start to answer this question, let’s thanks Steven Nagy for helping us understand this terminology http://azure.snagy.name/blog/?p=84.

As said before Microsoft has his own datacenter’s where they will have number of server’s running windows 2008 servers.


Note: - While I was writing this article what I understand is that currently they have one data centre in US west coast which hosts Windows Azure application.

The whole concept of Azure is to give decent hosting rates to the end user. So Microsoft has to somehow share his hardware across multiple applications.

In order to share the physical hardware across multiple applications, Microsoft used ‘Hypervisor’. Hypervisor is a modified version of Hyper-V. So hypervisor can help you to create virtual machines from those physical hardware servers. You basically end up with a cluster of nodes which can have virtual machine or hardware’s.

If you really expand these rectangle nodes you end up in to a Fabric like structure.

Image 7

Figure: - Fabric

So now let’s define fabric. It’s nothing but a cluster of nodes. These nodes can have physical machines or virtual machines.

Image 8

Where does our application run?

Our application run on the fabric nodes and each application gets its own virtual space resource. We will discuss about the same in more detail as we move ahead in the FAQ.

What is a fabric controller?

Fabric controller is the heart of the Azure fabric system. It manages complete life cycle of Azure services. Below are some important roles which Fabric controller plays:-
• Manages provisioning for the application. As per application needs fabric allocates CPU , memory and bandwidth limits.
• Deploy the services.
• Monitor system status and health. See that it satisfies the SLA’s defined.
• If there are failures recover from the same.

What are roles, web role and worker role?

Roles are nothing but applications or components. To define the same in other words they are actually the application code. Windows Azure categorizes application in two categories one is the web application and the other is the worker application.

Web role / Web application: - A web role is a Web application which can be accessed via HTTP. A web role can be hosted as a subset of ASP.NET and Windows Communication Foundation (WCF) technologies.

Worker role / Worker process: - A worker role is a background processing application somewhat similar to a windows process. A worker role does not communicate directly with external the world. In other words it does not accept requests directly from the external world.

So is it that worker role cannot connect to external systems outside Azure?

Yes, worker role cannot connect take inbound calls from internet but it can make outbound calls. A worker role is background processing process so it does not have incoming internet requests. Worker role also has access to queue services. So that can be one more communication point where external systems can post data and worker role can read from the same.

Image 9

Figure: - Worker and Web role

Is it that every web and worker role is hosted in their own virtual machines?

Yes, every web role and worker role are hosted in their own virtual space or we can say in their own virtual machine. Fabric does not allocate IIS for worker role virtual machine.

Image 10

You can see from the above figure how fabric controller uses the data centre hardware and creates new VM. Our application runs in those virtual machines. So if it’s a web role fabric controller will create a new VM instance with IIS and your web role instance. If it’s a worker role then it will create work role instance only. It will not provide IIS instance for worker role as its not supposed to take inbound calls from external world.

How do the web role instance and worker role instance communicate with fabric?

Every virtual machine has an agent. This agent facilitates communication between web and worker role instance with the fabric.

Image 11

What are blobs, tables and Queues?

Till now we have only discussed about application code. With application you also need to save data. Windows Azure has three kinds of data blobs, tables and queues.

Blobs: - They are used to store large objects like images, audio, video etc.
Tables: - They are used to store durable and scalable data structure. Tables consist of entities and entities have properties.

Image 12

Figure: - Table structure

Queues: - Queues are used enable asynchronous communication. They are enabled to store transient data in form of messages. Azure uses queues to communicate between different entities. For instance of a worker role and web roles wants to communicate they use queues.

We will be discussing the above 3 things in more detail in the coming FAQ series. We will be dedicating each one of them a complete FA series. Till then hold your breath.

So is SQL is the standard way to query blobs, tables and queues?

No we cannot use standard SQL to query the above azure storages. They are accessed through REST (Representational state transfer). REST is a style of software architecture distributed systems. So if you want to read a data from a table you need to specify the below URL.

http://<<WebsiteWhereTableisHosted>>/<TableName>?$filter=<Query >

The first is the website on which the table is hosted , second is the table name and then your query.

Why was not SQL preferred?

REST relies completely on HTTP protocols which enables other languages like PHP.JAVA to communicate with Azure storages. In other words you can build your application using any language like CGI, PHP and have your data stored in Azure storage.

Why one more data storage when we already have SQL Server?

Windows azure will be using a common hosting platform so that cost of hosting is less for customers. In other words the storage should be highly scalable. In order to support these kinds of requirements we need to scale out and not scale up. Windows azure storage is built on scale out architecture.

Due to this SQL Server service is costly than azure storages. Let us try to understand why the cost increases because of Scale out architecture.

Scale up means when your database needs more processing power you just replace it with a more powerful processor. In other words you just buy more powerful processor with better RAM and put your application on the same. Because the numbers of processor do not change you are not charge with extra SQL Server licenses.

Image 13

Figure :- Scale up

In scale out you add multiple servers as and when you need more processing power. Because news servers are added you also need to buy SQL Server licenses for each hardware. Azure is a scale out model. As per more processor needs Microsoft will add more hardware to his data centres. Due to more licenses the cost of SQL Server service will be higher as compared to windows azure storage.

Image 14

Figure: - Scale out

So use Azure storage:-

• If your application is having a massive scale.
• You are not looking for rich relational data functionality like SQL, structured relational tables etc.
• You are looking for a less cost.

You need to use SQL Azure service
• Scalability is not the important factor.
• You are looking for rich database functionalities like SQL, structured relational tables etc.
• Cost is not a big matter.
 

How do web role and work role communicate with each other?

Coming soon….

What is a fault domain?

Coming soon….

References

• Start learning and prepare for Cloud course on Azure AZ - 900 Certification.
• SaaS configuration LionBridge whitepaper http://www.lionbridge.com/lionbridge/en-US/kc/product-engineering/configurability-in-saas.htm .
• The article by Modesty zhang really inspired me to write this article, here’s a reference http://www.codeproject.com/KB/silverlight/Azurelight.aspx
• An Introduction to Microsoft® .NET Services for Developers: - The .NET framework for the cloud by Aaron Skonnard, Pluralsight. You can read the white paper from http://go.microsoft.com/fwlink/?LinkID=150833 .
• Definition of the word fabric http://azure.snagy.name/blog/?p=84
• Awesome presentation which depicts the inside of windows azure infrastructure details http://mschnlnine.vo.llnwd.net/d1/pdc08/PPTX/ES19.pptx

For further reading do watch the below step by step video on Azure DevOps

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect https://www.questpond.com
India India

Comments and Discussions

 
GeneralMy vote of 5 Pin
Santhakumar M16-Nov-15 17:26
professionalSanthakumar M16-Nov-15 17:26 
GeneralMy vote of 5 Pin
JasonMacD5-Mar-14 6:55
JasonMacD5-Mar-14 6:55 
QuestionBut does it blend yet? Pin
Vitaly Tomilov24-May-12 15:17
Vitaly Tomilov24-May-12 15:17 
AnswerRe: But does it blend yet? Pin
OJ7-Nov-12 6:34
OJ7-Nov-12 6:34 
Generalmy vote of 5 Pin
Uday P.Singh1-Jan-12 7:16
Uday P.Singh1-Jan-12 7:16 
GeneralMy vote of 5 Pin
maq_rohit20-Aug-11 5:02
professionalmaq_rohit20-Aug-11 5:02 
GeneralMy vote of 5 Pin
Wendelius11-Jul-11 5:28
mentorWendelius11-Jul-11 5:28 
GeneralMy vote of 5 Pin
yogex14-Jun-11 17:43
professionalyogex14-Jun-11 17:43 
GeneralAzure FAQ Part 1 Pin
joeanneaeb2-Sep-10 3:42
joeanneaeb2-Sep-10 3:42 
GeneralMy vote of 5 Pin
RickyJiao23-Aug-10 23:01
RickyJiao23-Aug-10 23:01 
GeneralNice Article Pin
Anurag Gandhi9-Jun-10 2:41
professionalAnurag Gandhi9-Jun-10 2:41 
GeneralAdditional Cost Savings and Efficiency Gains that you get with Azure Pin
GoAzure13-Apr-10 13:12
GoAzure13-Apr-10 13:12 
GeneralGreat Pin
Viral Upadhyay6-Jan-10 1:06
Viral Upadhyay6-Jan-10 1:06 
GeneralGreat Article, expecting the remaining part soon... Pin
Arfan Baig24-Sep-09 20:38
Arfan Baig24-Sep-09 20:38 
GeneralExcellent Pin
Modesty Zhang7-Sep-09 8:48
Modesty Zhang7-Sep-09 8:48 
GeneralMy vote of 5 Pin
Hristo-Bojilov13-Aug-09 20:45
Hristo-Bojilov13-Aug-09 20:45 
GeneralCongrats to become Microsoft MVP and great article Pin
siddeshapache9-Aug-09 1:29
siddeshapache9-Aug-09 1:29 
GeneralRe: Congrats to become Microsoft MVP and great article Pin
Onzin Romero10-Aug-09 22:35
Onzin Romero10-Aug-09 22:35 
GeneralRe: Congrats to become Microsoft MVP and great article Pin
NideshTheDeveloper16-Aug-09 16:53
NideshTheDeveloper16-Aug-09 16:53 
GeneralExcellent article Pin
Sainath Sherigar4-Aug-09 23:59
Sainath Sherigar4-Aug-09 23:59 
GeneralExcellent article Pin
r a m e s h3-Aug-09 22:49
r a m e s h3-Aug-09 22:49 
GeneralGood coverage Pin
Binoy Patel3-Aug-09 11:47
Binoy Patel3-Aug-09 11:47 
GeneralSimply Superb!!! Pin
Rajesh Pillai3-Aug-09 8:18
Rajesh Pillai3-Aug-09 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.