More Frequently Asked Microsoft Azure Interview Questions

1) What is Cloud Computing?

Cloud computing is Internet-based computing whereby shared resources, software, and information are provided to computers and other devices on-demand.

Cloud computing is a culmination of numerous attempts at large-scale computing with seamless access to virtually limitless resources.

Cloud Computing = Software as a Service + Platform as a Service + Infrastructure as a Service.

A number of characteristics define cloud data, applications services, and infrastructure:-

a) Remotely hosted: Services or data are hosted on a remote infrastructure.

b) Ubiquitous: Services or data are available from anywhere.

c) Commodified: The result is a utility computing model similar to traditional utilities, like gas and electricity; you pay for what you need!

Cloud computing can be categorized into three parts:-

  1. Platform as a Service (PaaS)
  2. Infrastructure as a Service (IaaS)
  3. Software as a Service (SaaS)

2) What are the components of Cloud Computing?
Components in a cloud refer to the platforms, like the front end, back end, and cloud-based delivery and the network used. Altogether it forms an architecture for cloud computing. With the main components like SAAS, PAAS and IAAS there are 11 more major categories in cloud computing that are:-

a) Storage-as-a-Service: This is where we can use or request storage. It’s also called disk space on demand.
b) Database-as-a-Service: It acts as a live database from the remote.
c) Information-as-a-Service: Information that can be accessed remotely from anywhere is called Information-as-a-Service.
d) Process-as-a-Service: It combines various resources such as data and services. This happens either hosted on the same cloud computing resource or remote.
e) Application-as-a-Service: Application-as-a-Service (also known as SAAS) is the complete application built ready for use by the client.
f) Platform-as-a-Service: This is where the app is developed and the database is being created, implemented, stored and tested.

g) Integration-as-a-Service: Integration-as-a-Service deals with the components of an application that has been built but must be integrated with other applications.
h) Security-as-a-Service: This is a crucial component that customers require. There are three-dimensional securities found in cloud platforms.
i) Management-as-a-service: It is mainly used for management of the clouds, like resource utilization, virtualization and server up and downtime management.
j) Testing-as-a-Service: Testing-as-a-Service refers to the testing of the applications that are hosted remotely.

k) Infrastructure-as-a-Service: This is called as nearly as possible the taking of all the hardware, software, servers and networking that is completely virtual.3


3) What is the Service Model in Cloud Computing?
This is the service model on which you will host your application(s), for example IaaSPaaS or SaaS. Each of these service models requires various levels of support and responsibilities once a system is deployed to the platform.

To resolve the future challenges that you might encounter you need to understand the models carefully. Other than the service model, the second, you need to decide whether you want a Private or On-Premise cloud, or you want your application to be deployed on a Public Cloud.
Every service model offers you some kind of resource required to operate the most web-enabled systems imaginable.

4) What are the kind of cloud storage and why is cloud computing is so popular?
Data is centrally stored in the cloud and available across the internet. There are various storage options available or we can classify them broadly in the following three categories:-
Public Cloud:
In this model, a service provider makes resources, such as application and storage, available to the general public over the internet. Public cloud services may be free or offered on a pay-per-usage model.

Private Cloud:
A private cloud provides more control over the company’s data and under the control of the company’s IT department.

Hybrid Cloud:
A hybrid cloud is a combination of public cloud storage and private cloud storage, where some critical data resides in the enterprise’s private cloud and other data is stored and accessible from a public cloud storage provider.

Benefits of a cloud:

a) Lower costs, “Pay as you use”

b) Software updates

c) Backups

d) Data hosted centrally

e) Scalability

f) Failover

g) Monitoring services

h) Data storage

There are many reasons why cloud computing is so widely popular:

1) Reduction of costs

2) Universal access

3) Software updates

4) Scalability

5) Flexibility


5) What is the Windows Azure Platform?
The Windows Azure Platform lays the foundation for running applications and keeping data on the cloud. It contains computer services, storage services and the fabric.

Windows Azure affords a wide range of capabilities in the form of computing services to run applications, storage services and creating a framework that supports several applications, as well as host services and manage them centrally.

This platform readily stipulates an internet infrastructure for deploying distributed applications and services since we can develop a cloud service in Visual Studio .NET and deploy it into the Azure cloud right from on-premise tools.

An Azure platform is a group of three cloud technologies as in the following:

6) What is Windows Azure and explain its services?
Windows Azure is created by Microsoft and is a cloud computing infrastructure and platform.

It is designed for working on the global network of Microsoft. It is for building, managing and deploying services and applications. Windows Azure supports various programming languages, tools, and frameworks.

It can be included in both Microsoft specific and third-party systems and software. It provides an infrastructure of services and platforms as services. It is also an open and flexible cloud platform that makes it easy to work on the global network. It helps us to quickly create, manage and deploy applications on the global network.

Features of Windows Azure
Windows Azure runs and stores the data on Microsoft datacenters. There are many features that are specified here:

a) Websites allow the developers to build the sites using ASP.NET, PHP, etc and deploy these websites using FTP, Git etc.
b) SQL Database, formally known as Azure database creates, extends and scales the application into the cloud using Microsoft SQL Server.
c) This is Microsoft’s platform as a service that supports the Multi-tier applications and automated deployment.

Windows Azure Services

Various types of services that are provided by Windows Azure:-

  • Web Sites
  • Cloud services
  • Virtual Machine
  • Data ManagementSQL Database.
    Tables.
  • Business AnalyticsSQL Reporting.
    Data Marketplace.

7) What are the roles available in Windows Azure?

Roles are an important concept in Windows Azure and learning them is the base for further programming. There are mainly three roles in Windows Azure.

  • Web Role
  • Worker Role
  • VM Role

Web Role: 

It provides a web front-end solution. This is similar to an ASP.NET application. While under hosting Azure provides IIS and required services.

Worker Role: 

It provides a background service solution. This can be thought as a windows service application. We can use this role to run background operations like database management tasks, report generation, etc. It can run lengthy operations.

According to MSDN, the Web Role can be considered as a Worker role loaded with IIS. Similarly, the worker role can be used to host other application platforms.

VM Role (Virtual Machine Role): 

The Web Role and Worker Role are executed on virtual machines. The Virtual Machine Roles provides the user the ability to customize the virtual machine on which the web and worker roles are running. The VM role runs a virtual hard disk (VHD) image which can be created and uploaded by the user. Through the VM role, the customers can run scheduled tasks and other windows services.


8) What is Windows Azure Portal and also explain the Azure Fabric?
In Windows Azure Portal, to run an application, a developer accesses the Windows Azure portal through her Web browser, signing in with a Windows Live ID. He/She then chooses whether to create a hosting account for running applications, a storage account for storing data, or both.

Once the developer has a hosting account, the developer can use a Windows Azure portal to submit applications to Windows Azure.

When the user sends a request to an application hosted on Azure (that can be passed by protocols like HTTP, HTTPS or TCP), the request will be received from the load balancer. The Load balancer balances the load across all the instances of the role (Web, Worker, and VM).

Azure Fabric:

The Azure fabric is the main core concept over here. It provides a service called the Azure Fabric Controller. It is called as OS for the Azure. Because it  handles/manages:

  • All roles (computing) and resources.
  • Deployment and activating services.
  • Health monitoring for all services.
  • Allocating, releasing of resources.
  • Provisioning VM, terminating etc.

Updating patches for installed OS on VM automatically.

So there would be better to have two instances of roles and also no need to worry about software updates for the user.


9) What are the three main components of Windows Azure Platform?
Windows Azure provides platform and infrastructure by providing a scalable and cost-effective computing, storage, and networking resources on demand.
Windows Azure has three main components: ComputeStorage and Fabric.
1. Windows Azure Compute

Windows Azure provides a hosting environment for managed code. It provides computation service through roles. Windows Azure supports 3 types of roles:

  • Web roles used for web application programming and supported by IIS7.
  • Worker roles used for background processing of web roles.
  • Virtual Machine (VM) roles used for migrating windows server applications to Windows Azure in an easy way.

2. Windows Azure Storage

Windows Azure provides storage in the cloud. It provides 4 types of storage services:

  • Queues for messaging between web roles and worker roles.
  • Tables for storing structural data.
  • BLOBs (Binary Large Objects) to store text, files or large data.
  • Windows Azure Drives (VHD) to mount a page blob. These can be uploaded and downloaded via blobs.

3. Windows Azure AppFabric

AppFabric provides infrastructure services for developing, deploying and managing Windows Azure application. It provides 5 services:

  • Service bus
  • Access
  • Caching
  • Integration
  • Composite

10) What are the differences between a public cloud and a private cloud?
Private clouds are those that are built exclusively for an individual enterprise. They allow the firm to host applications in the cloud while addressing concerns regarding data security and control that is often lacking in a public cloud environment. It is also known as an internal or enterprise cloud and resides on the company’s intranet or hosted data center where all of your data is protected behind a firewall.

Public Cloud

  • Pay for whatever resource you need at whatever time period.
  • These are provided commercially.
  • Supports heavy workloads without disturbing any functionality.
  • It is very cheap for the consumers since the hardware, application and other costs are handled by the providers.
  • There is no wasted resource because consumers are charged for what they use.
  • Scalability is always met here.

Private Cloud

  • It is owned by a specific private group for their own use of employed, partners and their own customers.
  • Highly controlled and not accessible by anyone other than allowed.
  • Security, governance and compliance are highly automated.
  • Similarly, the features are like a Public Cloud irrespective of security and maintenance.
  • The cost is very high.

11) What do you understand about Hybrid Cloud? Explain in detail.
A hybrid cloud is a mixture of internal and external cloud services, a combination of a private cloud combined with the use of public cloud services. This type of cloud is most suitable when you want to keep the confidential data on your premise (private cloud) and consume the other services from a public cloud.

Pros of Hybrid Cloud

  • Scalability:
    Usually, the Private Cloud services will have a lesser scalability due to its security, cost and compliance whereas the Public Cloud has a high scalability and moving non-sensitive data from the private to the public will free up resources in the data centers in the Private Cloud and that increases a very high scalability for a Hybrid Cloud.
  • Cost effective: 
    Similarly, the Public Cloud is very cost effective rather than Private Cloud and here the Hybrid Cloud provides cost effectiveness with the data and other sensitive operations secured.
  • Security: 
    Since there is a Private Cloud used; the data and sensitive operations are secured highly in the Hybrid Cloud.
  • Flexibility: 
    We can easily move out of the non-sensitive data and manage large scalability using a Public Cloud service along with the Private Cloud. So with the availability of a large scalability using Public Cloud and security using Private Cloud an enterprise has a vast opportunity in developing for new needs.

Cons of Hybrid Cloud

  • Infrastructure dependency
  • Networking
  • Security compliance

12) What is Diagnostics in Windows Azure?
It provides facility to store diagnostics data. Some diagnostics data is stored in a table, while some is stored in a blob. For collecting diagnostics data, we must initialize the Windows Azure diagnostic monitor. The Windows Azure diagnostic monitor runs in Windows Azure and in the computer’s emulator and collects diagnostic data for a role instance.

Following diagnostics data is stored in table storage:

Data Source Table name in Azure Storage Detail
Windows Azure Logs WADLogsTable These are the application logs dumped from the application.
Windows Azure Diagnostics Infrastructure Logs WADDiagnosticInfrastructureLogsTable These are the logs about running of diagnostics service.
Windows Event logs WADWindowsEventLogsTable These are the logs generated on the instance where logs are running.
Performance counters WADPerformanceCountersTable These are the performance matrices like memory utilization, processor utilization, response time etc.

Following diagnostics data is stored in blob storage:

Data Source Container name in azure storage Detail
IIS Logs wad-iis-logfiles These are the IIS logs generated by role instances.
Failed Request Logs wad-iis-failedreqlogfiles These are the IIS failed requests logs generated by role instances.
Crash Dumps wad-crash-dumps These are the logs generated on the application crash.

13) What is Azure Queues?
The main reason for using queues is to provide loose connectivity among various components. For example, we have two components of an application to exchange data. Here one of them is on-premise and one exists in the cloud.Using web service to exchange data we have the following issues:

  • Both components should be online simultaneously; if not the communication fails.
  • It’s difficult to scale up if there’s excessive work.

In Azure Queues, you have a queue as the mediator that connects the two components, so when the receiver is down, the sender can still insert messages into the queue, once a receiver comes online it can receive the message from that queue. And for scale-up we just need to add more receivers and your queue is processed in parallel.

The following are the drawbacks of using a queue:

  • Queues have some charges however, these are minimal.
  • Your queue is doing mediator work here. If your queue is down, devices will not able to communicate with each other.

14) What is the difference between Windows Azure Queues and Windows Azure Service Bus Queues?

Windows Azure Queues:

Its storage is a service for storing a large number of messages that can be accessed from anywhere using HTTP or HTTPS. A single message can be up to 64KB in size. So, a queue may contain millions of messages. It is basically a part of Windows Azure Storage and enabled with a REST-based architecture.

Service Bus Queues:

  • Service Bus queues support brokered messaging communication.
  • Queues provide First In, First Out (FIFO) message delivery, in other words, messages are received and processed by the receivers in the order they were added to the queue.
  • Each message is received and processed by only one message receiver.

15) How can you create a Queue in storage account?
A queue is one type of Azure Storage, where you can store your data in storage. Blobs are stored in a container, Entity in table and Message Queue.
Following are the key concepts of queue:-

  • FIFO implementation
  • Messages are added to end of the Queue and processed from the front
  • Queues provide a good way to Front end and Back end decoupling

The user can queue a job through the web role (front end) which can be processed by a worker role (backend). This gives an opportunity to decouple the web role and worker role.

Code:

1.         Place a new label control on the aspx page and add the following code in the page load event.

2.         protected void Page_Load(object sender, EventArgs e)

3.         {

4.         StorageCredentialsAccountAndKey accountAndKey = newStorageCredentialsAccountAndKey(“account”, “key”);

5.         CloudStorageAccount account = new CloudStorageAccount(accountAndKey, true);

6.         CloudQueueClient client = account.CreateCloudQueueClient();

7.         CloudQueue queue = client.GetQueueReference(“workitems”);

8.         queue.CreateIfNotExist();

9.         CloudQueueMessage message = new CloudQueueMessage(“Test Work Item”);

10.       queue.AddMessage(message);

11.       // Populate the messages

12.       message = queue.GetMessage();

13.       if (message != null) Label1.Text = “Message in Queue: ” + message.AsString;

14.       }


16) What is a Storage key?
Storage keys or Access Keys are used as an authentication mode for accessing the storage services account to manipulate information based on our requirements. In Windows Azure we have an option to provide a Primary Access Key and a Secondary Access Key, even though we will use a single access key to authenticate our application to the storage. The main reason to provide the secondary access key is to avoid downtime to the application. If we need to change the application access key by regenerating the access key it takes quite some time to take effect; this provides a downtime.

To avoid this type of situation, a secondary access key is provided so that if the primary needs to be changed or regenerated we can map the secondary temporarily to the storage and regenerate the primary. Let us see step by step of how to get the Access Keys using Windows Azure Management Portal.


17) What is the concept of the table in Windows Azure?
A table is one type of Azure Storage, where you can store your data in storage. Blobs are stored in container and Entity in a table.
Following are the key concepts in a table.

  • Tables allow structure data storage
  • There can be 0..n tables in a storage account
  • Table store data as a collection of entities
  • An entity has a primary key and properties as a key-value pair.

18) How to send messages to a Queue and how to receive messages from a Queue?

Send messages from a queue
The code below demonstrates how to create a QueueClient object for the “TestQueue” queue created using the CreateFromConnectionString API call:

1.         string connectionString =

2.         CloudConfigurationManager.GetSetting(“Microsoft.ServiceBus.connection string”);

3.         QueueClient Client =

4.         QueueClient.CreateFromConnectionString(connectionString, “TestQueue”);

5.         Client.Send(new BrokeredMessage());

Messages sent to (and received from) Service Bus queues are instances of the BrokeredMessage class. BrokeredMessage objects have a set of standard properties (such as Label and TimeToLive), a dictionary that is used to hold custom application specific properties, and a body of arbitrary application data. An application can set the body of the message by passing any serializable object into the constructor of the BrokeredMessage, and the appropriate DataContractSerializer will then be used to serialize the object. Alternatively, a System.IO.Stream can be provided.

Receive messages from a queue

The easiest way to receive messages from a queue is to use a QueueClient object. These objects can work in two different modes: ReceiveAndDelete and PeekLock.

When using the ReceiveAndDelete mode, reception is a single-shot operation; that is, when the Service Bus receives a read request for a message in a queue, it marks the message as consumed, and returns it to the application.

The ReceiveAndDelete mode is the simplest model and works best for scenarios in which an application can tolerate not processing a message in the event of a failure. To understand this, consider a scenario in which the consumer issues are received, requested and then crashes before processing it. Because the Service Bus will have marked the message as being consumed when the application restarts and begins consuming messages again, it will have missed the message that was consumed prior to the crash.

This example creates an infinite loop and processes messages as they arrive in the “TestQueue“:

Code

1.         Client.Receive();

2.         // Continuously process messages sent to the “TestQueue”

3.         while (true)

4.         {

5.         BrokeredMessage message = Client.Receive();

6.         if (message != null)

7.         {

8.         try

9.         {

10.       Console.WriteLine(“Body: ” + message.GetBody < string > ());

11.       Console.WriteLine(“MessageID: ” + message.MessageId);

12.       Console.WriteLine(“Test Property: ” + message.Properties[“TestProperty”]);

13.       // Remove message from queue

14.       message.Complete();

15.       }

16.       catch (Exception)

17.       {

18.       // Indicate a problem, unlock message in queue

19.       message.Abandon();

20.       }

21.       }

22.       }


19) What are the Storages in Windows Azure?
Windows Azure data storage enables users to store, access, analyze and protect their data while making it available from anywhere and at any time. Windows Azure provides various services from storing data in SQL databases in the cloud for analysis and reporting to meet the needs of your business. Windows Azure ensures data security with a high throughput of application data in the cloud. Windows Azure typically offers the following three types of storage in the cloud atmosphere.

  • BLOB: BLOBs offer a mechanism for storing large amounts of text or binary data, such as images, audio and visual files. It can scale up to 200 terabytes and can be accessed using REST APIs. We can move BLOB data as a single volume between private and public clouds using Windows Azure Drive.
  • Table: Tables represent storage locations across machines for data that reside in the form of entities and properties on the cloud. Tables store large amounts of unstructured data that can be accessed either using REST APIs from within a service running in Windows Azure or directly over the Internet using HTTP/HTTPS.
  • Queue: The sole objective of a Queue is to enable communication between Web and Worker Role instances. They aid in storing messages that may be accessed by a client. Web Role instances can initiate user requests that need to be processed in the background. On the other side a Worker Role observers the queue to process the request and respond back via a queue to the Web Role instance.

20) What is Federation in SQL Azure?
Federation is introduced in SQL Azure for scalability. Federation helps both administrators and developers to scale data. It helps administrators by making repartitioning and redistributing of data easier. It helps developers in the routing layer and sharing of data. It helps in routing without application downtime.

Federation does basic scaling of objects in a SQL Azure Database. Federations are the partitioned data. There can be multiple Federations within a database. And each Federation represents a different distribution scheme.

We create a Federation with a different distribution scheme and requirement. Student and Grade’s tables of a School Database may have a different distribution requirement so they are put into different Federations.

Each Federation object scales out data to many systems managed nodes. A Federation object contains:


21) What is SQL Azure Database?
SQL Azure database is simply a way to get connected to Cloud Services where we can store our database into Cloud. Microsoft SQL Services and Microsoft SQL Data Services are now known as Microsoft SQL Azure and SQL Azure Database. Microsoft Azure is the best way to use PAAS (Platform as a Service) where we can host multiple databases on the same Account.
Microsoft SQL Azure has the same feature of SQL Server, i.e. high availability, scalability and security in the core.

Microsoft Azure SQL Database has a feature, it automatically creates backups of every active database. Every hour a backup is taken and geo-replicated to enable the 1-hour recovery point objective (RPO) for Geo-Restore. Additionally, transaction log backups are taken every 5 minutes to enable Point in Time Restore.

Nitesh

Nitesh

Author

Bonjour. A curious dreamer enchanted by various languages, I write towards making technology seem fun here at Asha24.