Cloud Computing and Data Center Technologies
Cloud Computing and Data Center Technologies
UNIT III
Title: PAAS cloud platform (9)
Course Objective 3: To explore the Windows Azure services and illustrate the way to make applications in
Windows Azure
Windows Azure: Origin of Windows Azure, Features, The Fabric Controller – First Cloud APP in
Windows Azure- Service Model and Managing Services: Definition and Configuration, Service
runtime API- Windows Azure Developer Portal- Service Management API- Windows Azure Storage
Characteristics-Storage Services- REST API- Blobs
Course outcome 3:
Microsoft Azure is one of the widely used cloud computing platforms designed by Microsoft in 2010. Azure provides
a wide variety of services such as cloud storage, compute services, network services, cognitive services, databases,
analytics, and IoT. It is considered an excellent Platform as a Service (PaaS), offering an application platform for
developers to build Web, mobile and API applications. Its offerings range from simple marketing and digital presence
applications to scalable e-commerce solutions and hyper-scale, customizable applications. It provides a wide range of
services to help organizations manage their data and applications in the cloud. It makes building, deploying, and
managing applications very easy. For example, to set up a huge server, we will require huge investment, effort,
physical space, and so on. In such situations, Microsoft Azure comes to our rescue. It will provide us with virtual
machines, fast processing of data, analytical and monitoring tools, and so on to make our work simpler. The pricing of
Azure is also simpler and more cost-effective. Popularly termed as “Pay As You Go”, which means how much you
use, pay only for that.
Azure helps developers and IT professionals build deploy and manage applications. It uses the virtualization to
separate the tight coupling between the hardware and the operating system using an abstraction layer called a
hypervisor. Hypervisor emulates all the functions of a computer in a virtual machine, it can run multiple virtual
machines at the same time and each virtual machine can run any operating system, such as Windows or Linux. Azure
takes this virtualization technique and repeats it on a massive scale in the data center owned by Microsoft. Each data
center has many racks filled with servers and each server includes a hypervisor to run multiple virtual machines. The
network switch provides connectivity to all those servers.
1.1 AZURE HISTORY
Microsoft unveiled Windows Azure in early October 2008 but it went to live after February 2010. Later in 2014,
Microsoft changed its name from Windows Azure to Microsoft Azure. Azure provided a service platform for .NET
services, SQL Services, and many Live Services. Many people were still very skeptical about “the cloud”. As an
industry, we were entering a brave new world with many possibilities. Microsoft Azure is getting bigger and better in
the coming days. More tools and more functionality are being added. It has two releases as of now. It’s a famous
version of Microsoft Azure v1 and later Microsoft Azure v2. Microsoft Azure v1 was more JSON script-driven than
the new version v2, which has interactive UI for simplification and easy learning. Microsoft Azure v2 is still in the
preview version.
1.2 ARCHITECTURE
The Windows Azure platform is a group of cloud technologies, each providing a specific set of services to application
developers:
Windows Azure: A Windows environment for running applications (Compute) and storing data (Storage) in the
cloud. A Windows Azure application can be created using three kinds of compute service types, called roles: (i) a
Web role for running web-based applications, (ii) a Worker role for (background) processing, and (iii) a VM role to
run VM images. An application is structured as any combination of role instances. Web and worker role instances
consist of a Windows Server 2008 R2 VM with the .NET 4.0 framework pre-installed. In a web role, there is also an
IIS web server available.
The storage service consists of blob storage (course-grained, unstructured data), table storage (set of entities with
properties, NoSQL), and queues (asynchronous communication between different roles). All data is accessible via a
REST API and the OData query language for tables.
The Fabric Controller makes abstraction of the underlying infrastructure and offers a pool of processing power to the
compute and storage services.
SQL Azure: A cloud-based service for relational data, built on Microsoft SQL Server. Comparing PaaS offerings in
light of SaaS development
Windows Azure AppFabric: A middleware platform on top of Windows Azure that provides a higher level of
abstraction and reduces the complexity of cloud development. The AppFabric Container provides a new programming
model and runtime for cloud application development using .NET core languages. The AppFabric Container itself is
not publicly available and therefore not further discussed in this paper, but Microsoft offers several AppFabric
Services on top of this container, for example caching. Recently, the AppFabric Services are renamed to Windows
Azure Features. The Windows Azure platform provides an environment that strongly corresponds to a traditional on-
premise setup, this especially applies to the Windows Azure Compute service and SQL Azure.
1.3 FEATURES
1. Scalability and Flexibility: One of the key benefits of Microsoft Azure is its unmatched scalability and
flexibility. Whether your business is experiencing rapid growth or needs to accommodate seasonal fluctuations,
Azure allows you to effortlessly scale your infrastructure up or down as per your requirements. In addition, Azure
provides a wide range of services, including virtual machines, storage, and networking, allowing businesses to
build custom solutions that meet their specific needs. This flexibility allows organizations to create and deploy
applications quickly and easily, improving time to market and providing a competitive advantage.
2. Security and Compliance: Data security and compliance are top priorities for any business, and Microsoft Azure
provides a range of features and services to help organizations protect their data in the cloud. Azure’s security and
compliance features include built-in threat intelligence, compliance certifications, and advanced threat protection.
Azure also provides role-based access control, allowing organizations to control who has access to their data and
applications. Additionally, it provides encryption at rest and in transit, ensuring that data is protected throughout
the entire lifecycle.
3. Cost Savings: One of the biggest benefits of Azure is its cost savings. Migrating to Microsoft Azure can lead to
significant cost savings for businesses. With Azure, there are no upfront costs for hardware or infrastructure, and
organizations only pay for the services they use. This means that businesses can reduce their capital expenditures
and operational expenses, while still having access to the latest technology and features. In addition, Azure
provides a range of tools and services to help businesses optimize their cloud spend, including cost management
and resource optimization tools. These tools allow organizations to monitor and control their Azure costs,
ensuring that they are only paying for what they need.
4. Disaster Recovery and Business Continuity: Disaster recovery and business continuity are critical for
businesses of all sizes. Microsoft Azure provides a range of services to help organizations protect their data and
applications in the event of a disaster. Azure Site Recovery allows businesses to replicate their applications and
data to a secondary location, ensuring that they can quickly recover in the event of an outage or disaster. Azure
Backup provides automated backups for virtual machines and applications, ensuring that critical data is always
protected.
5. Improved Collaboration and Productivity: Microsoft Azure provides a range of tools and services to improve
collaboration and productivity for businesses. Azure Active Directory allows organizations to manage their user
accounts and access control for all of their cloud applications, improving security and simplifying user
management. Azure also provides a range of collaboration tools, including Microsoft Teams and SharePoint.
These tools allow employees to collaborate on documents and projects in real time, improving productivity and
teamwork.
6. Advanced Analytics and Business Intelligence: Finally, Microsoft Azure provides a range of advanced
analytics and business intelligence tools to help organizations gain insights from their data. Azure provides a
range of services, including Azure Machine Learning and Power BI, allowing businesses to analyse their data and
gain insights to improve decision-making. In addition, Azure provides integration with other Microsoft products,
including Microsoft Dynamics 365 and Microsoft Office, providing a seamless experience for users and
improving productivity.
7. Global Reach and Availability: Azure operates a vast network of data centers strategically located across the
globe. This global presence ensures that businesses can access Azure’s services and applications with minimal
latency, regardless of their geographical location. With Azure’s geographically distributed data centers,
organizations can seamlessly expand their operations globally, reaching customers and markets previously out of
reach.
8. Hybrid Capabilities: Azure’s hybrid capabilities enable businesses to seamlessly integrate their on-premises
infrastructure with the cloud. This hybrid approach allows organizations to leverage the benefits of the cloud
while retaining control over sensitive data and complying with specific regulatory requirements. With Azure
Hybrid Benefit, businesses can optimize licensing costs by utilizing their existing investments in Microsoft
software licenses.
The Fabric Controller (FC) is a distributed program that manages the hardware and applications in a cluster internally
used by Azure. The key task of the FC is to assign the appropriate resources to an application based on the number of
roles, number of role instances, and the upgrade and fault domains specified by the application. Inside the datacenter,
there are many machines or servers aggregated by a switch. We can say that fabric controller is a brain of the azure
service that analyses the processes and makes decisions. Azure’s fabric controller is a piece of highly available,
distributed software that runs across all of Windows Azure’s nodes, and monitors the state of every node.
Fabrics are group of machines in Microsoft’s datacenter which are aggregated by a switch. The group of these
machines is called cluster. Each cluster is managed and owned by a fabric controller. They are replicated along with
these machines. It manages everything inside those machines, for e.g., load balancers, switches, etc. Each machine has
a fabric agent running inside it and fabric controller can communicate with each fabric agent.
The Fabric Controller (FC) is a distributed program that manages the hardware and applications in a cluster
internally used by Azure. The key task of the FC is to assign the appropriate resources to an application based on the
number of roles, number of role instances, and the upgrade and fault domains specified by the application. Each
machine in the cluster runs a hypervisor which hosts virtual machines running Windows 2008-compatible OSes. The
hypervisor is an Azure-specific version of Windows Operating System. The host operating system has an Azure host
agent that is responsible for monitoring the health of the physical machine, for starting virtual machine instances, and
for reporting the health of the machine to the Fabric Controller. The FC monitors host agents through a heart-beat
mechanism; if the FC detects that a host hasn't responded to a heartbeat within a pre-determined duration, it considers
the machine to be down and takes measures to restore the machine. Guest operating systems have a guest Azure agent
that monitors the role running on the VM. The guest agent restarts roles that terminate and keep the host agent
informed about the status of the virtual machine. The host agent and the guest agent also communicate through a
heartbeat; when the host detects that it hasn't received a heartbeat from a VM, it takes measures to restore the VM.
The FC also brings up new machines into the cluster when required, or when existing machines go down for any
reason. Figures show how the FC works with multiple host agents running different parts of a single application. To
prevent the FC from becoming a single point of failure, the FC itself runs on groups of machines.
Refer: https://yourstory.com/2012/02/step-by-step-guide-to-create-first-windows-azure-application
Here is a step by step guide to developing and deploying your first Windows Azure application. This tutorial has been
re-published from http://debugmode.net/ with the permission of the author.
This article is divided into five parts:
1. Installation of Windows Azure SDK
2. Developing First Windows Azure Web Application
3. Deploying application locally in Development Storage Fabric
4. Registration for free Windows Azure Trial
5. Deployment of the Application in Microsoft Data Center
Step 1 Go to official site of Windows Azure at link http://www.windowsazure.com/en-us/
Step 2 In bottom of page, you will get Develop option. Click on Show Me More.
Step 3 Choose the language you want to work with. You can develop application in any of the language given in
option and deploy it on the Microsoft managed datacenters. Below are the available languages.
Windows Azure SDK and tools are available to install via Web Installer. Click on the Install in the dialog window.
Next dialog windows will prompt you to agreement. Select I Accept option to proceed.
You will be getting dialog window indicating Windows Azure SDK being installed.
After successful installation you will get confirmation dialog windows as below.
Now click on Finish and Exit.
Congratulation by now you has installed Windows Azure SDK on your machine.
Developing First Application Open Visual Studio 2010 as administrator and create a new project. Open File -> New-
>Project. From Cloud tab select Windows Azure Project.
Next you need to click on your preferred language. You can use any of the three languages to develop application to
be deployed on Windows Azure. I am choosing language Visual C#. After clicking on the language you will get
options to select as either Web Role or Worker Role.
Before we proceed further, let us stop by and try to understand what are the Web Role are Worker Role? Web Role
takes HTTP input and Process it. It gives output as HTTP Response. It takes input from user via a user interface.
You create any application as Web Role instance. For example, If you want to create a Web Application using
ASP.Net then you will be choosing an ASP.Net Web Role in the project template If you want to create a WCF
Service and deploy it on Azure then you will be choosing WCF Service Web Role. If you want to create ASP.Net
MVC application then you will be choosing ASP.Net MVC Web Role. Worker Role runs in the background. It is used
to perform some background task. It does not take input from user. It takes input from Azure Storage or web Role.
Worker Role can be summarized as below,
Let us get back to creating first web application to be deployed on Windows Azure. Go ahead and select ASP.NET
Web Role and click on arrow button. If you want you can change name of the Web Role. Since this is your first
application so for the simplicity leave default name. After selecting Web Role click on Ok.
On exploring solution explorer you will find that there are two projects. One project is Widows Azure Project and
other is ASP.Net Web Role.
Let us explore Windows Azure Project. Project got two Service Configuration files. Extension of Service
Configuration file is cscfg
One Service configuration file is for local deployment and one contains configuration details to deploy to Microsoft
Data Center. On opening service configuration file, you will get below XML.
Below information’s are provided in service configuration file. Operating system version Operating system family
Connection string settings Instance counts By default instance count is set to 1. It means there will be one instance of
Web Role will be running for the deployment. Let us go ahead and increase instance count to 2. Change value to 2 in
Instance count entry as below and save the file.
Next important file is Service Definition file. Extension of Service Definition file is csdef
Manage Settings
Configure Web Role
Configure local storage
Manage settings
Configure End Points
Manage virtual networks
In later post we will go into details of each of the section of this UI. As of now we can proceed with default values.
Now we have a bit understating on different files in Windows Azure project in the solution. Other project is normal
ASP.NET Web Application project with one extra file called WebRole.cs. This file is used to host web application in
Windows Azure.
Let us open default.aspx and modify it as below, I have deleted all the default codes from MainContent and put one
H1 tag as below.
By this, we have created a simple ASP.Net Web Role Application to be deployed on Windows Azure.
You deploy application in two steps. First you deploy it locally to do testing that if everything is working as expected.
You can debug application deployed on local development fabric. A Windows Azure emulator run locally is also
known as Windows Azure Development Fabric. To run Windows Azure Web Role application locally makes sure that
Windows azure project is set as startup project and press F5. To make Windows azure project as startup project right
click on that and select set up as startup project
After setting startup project press F5 to run application on local development fabric. After pressing F5 you can see
that in bottom you are getting messages like initializing the Windows Azure storage emulator etc.
After successful deployment browser will get launched and you can see your Windows Azure Application running on
local development fabric.
You can see application is running on port 81 and default start page is default.aspx. Let us explore local development
fabric. To open local development fabric from the task bar right clicks on Windows Azure icon.
Right click on the Windows Azure icon and select Show Compute Emulator UI. You will get Windows Azure
Compute Emulator UI. In emulator you can see health of the Web Role instances. There are two instances running
since we configured two instance of Web Role in service configuration file.
On right clicking on the Web Role instance you can set logging level and can open local store.
In further post we will get into details of logging and health of Web Role instances. As of now we have seen the way
to create Windows Azure Web Role Application and deploy it locally. Now let is deploy created application in
Microsoft Data Center or on real cloud.
To deploy application on Microsoft Data Center you need to have a Windows Azure Account. Windows Azure is a
paid service however you can start with free trial. To register for free account follow the below steps.
Step 4 You will be asked to login using Live ID. Provide your live id and login. If you don’t have live ID create one
to work with Windows Azure Free Trail
Next choose Service Configuration as Cloud and Build Configuration as Release and click Package.
After successful package you can see Service Package File and Cloud Service Configuration file in the folder
explorer. We need to upload these two files to deploy application on Microsoft Data Center.
After successful registration for free account again browse to https://www.windowsazure.com/ and click on
Management Portal from Account section in bottom.
You will be navigated to live login page. Provide same live id and password you used to create Free Trial. After
successful authenticating you will be navigated to Management Portal. To deploy on Microsoft Data Center, first you
need to create Hosted Service. To create Hosted Service from left tab select Hosted Service, Storage, Account and
CDN
In top you will get three options. Their purpose is very much clear with their name.
Click on New Hosted Service to create a Hosted service. Provide information as below to create hosted service.
Choose Subscription Name. It should be the same as your registered subscription of previous step. Enter name of the
service Enter URL of the service. This URL need to be unique. On this URL you will be accessing the application. So
this application will be used at URL debugmodemyfirstservice.cloudapp.net Choose a region from the drop down. In
further post we will get into details of affinity group. In Deployment option choose, Deploy to production
environment. Give a deployment name. Next to upload package select browse locally. On browsing navigate to folder
and choose files. As of now for simplicity don’t add any Certificate and click on Ok to create a hosted service with
package of application created in last step. You will get a warning message. Click Yes on warning and proceed. Now
you need to wait for 5 to 10 minutes to get your application ready to use. Once service is ready you can see ready
status for the Web Role. After stats are ready, you are successfully created and deployed first web application in
Windows Azure. Browse to URL http://debugmodemyfirstservice.cloudapp.net/ to see your application running from
Microsoft Data Center.
4 SERVICE MODEL AND MANAGING SERVICES: DEFINITION AND CONFIGURATION
Azure Cloud Services is an example of a platform as a service (PaaS). Like Azure App Service, this technology
is designed to support applications that are scalable, reliable, and inexpensive to operate. In the same way that App
Service is hosted on virtual machines (VMs), so too is Azure Cloud Services. However, you have more control over
the VMs. You can install your own software on VMs that use Azure Cloud Services, and you can access them
remotely
More control also means less ease of use. Unless you need the additional control options, it's typically quicker
and easier to get a web application up and running in the Web Apps feature of App Service compared to Azure Cloud
Services. There are two types of Azure Cloud Services roles. The only difference between the two is how your role is
hosted on the VMs:
Web role: Automatically deploys and hosts your app through internet information services.
Worker role: Does not use internet information services, and runs app standalone.
For example, a simple application might use just a single web role, serving a website. A more complex
application might use a web role to handle incoming requests from users, and then pass those requests on to a worker
role for processing. As the preceding figure suggests, all the VMs in a single application run in the same cloud
service. Users access the application through a single public IP address, with requests automatically load balanced
across the application's VMs. The platform scales and deploys the VMs in an Azure Cloud Services application in a
way that avoids a single point of hardware failure.
Three key components constitute a cloud service.
ServiceDefenition.csdef file specifies the settings that are used by Azure to configure the cloud service.
For example - sites, endpoints, certificates, etc.
ServiceConfiguration.cscfg contains the values that will be used to determine the configuration of
settings for the cloud service. For example - number of instances, types of instances, ports, etc.
Service package.cspkg used to deploy the application as a cloud service. First, it needs to be packaged
using the CSPacK command-line tool. CSPacK generates an application package file that can be
uploaded into Azure using the portal.
The services provided by Microsoft are IaaS, PaaS, and SaaS.
SaaS (Software as a Service): It allows companies to use the software without purchasing them, which
reduces the expenditure of the company drastically since they are already installed on the cloud servers; they
can be quickly deployed and therefore saves time.
PaaS (Platform as a Service): It allows developers to build applications, collaborate on projects without
having to purchase or maintain infrastructure.
IaaS (Infrastructure as a Service): It allows companies to rent servers, storage space, etc. from a cloud
provider.
1. Microsoft Azure provides SaaS apps to users, you don’t need to purchase, install, update, or maintain any
hardware, middleware, or software. You only rent to app software.
2. You also save money because the SaaS service automatically scales up and down according to the level of
usage.
3. Mostly SaaS Apps run directly on the web browsers, no need to download and install any software. But
some apps require to install and on your on-premise machine.
4. SaaS apps support all types of devices the only the internet should be available on your device.
5. With data stored in the cloud, users can access their information from any Internet-connected computer or
mobile device. And when app data is stored in the cloud, no data is lost if a user’s computer or device fails.
5 SERVICE RUNTIME API
The Service Runtime API in Azure refers to the set of APIs that allow developers to interact with Azure
services and manage their cloud resources programmatically. While Azure has a wide range of services, including
Azure Compute, Azure Storage, and Azure Networking, the Service Runtime API typically focuses on managing and
orchestrating cloud resources, often in the context of Azure Service Fabric or other Azure services.
1. Service Fabric
Overview: Azure Service Fabric is a distributed systems platform that simplifies the packaging, deployment,
and management of scalable and reliable microservices.
APIs: The Service Fabric API provides methods for managing applications, services, and the overall cluster.
Key operations include creating, updating, and deleting services, as well as monitoring the health of
applications.
2. Azure Management REST APIs
RESTful Interface: Azure provides a set of REST APIs that enable programmatic access to Azure services.
These APIs can be used to manage resources such as virtual machines, storage accounts, and databases.
Authentication: Access to these APIs typically requires Azure Active Directory (Azure AD) authentication
and authorization.
3. Azure SDKs
Client Libraries: Azure offers SDKs for various programming languages (like .NET, Python, Java, etc.) that
wrap the REST APIs and provide a more convenient programming interface.
Integration: These SDKs help developers build applications that leverage Azure's capabilities, simplifying
tasks such as deployment, monitoring, and scaling.
4. Common Use Cases
Automating Resource Management: Using the Service Runtime API to automate the creation, updating,
and deletion of Azure resources.
Monitoring and Diagnostics: Integrating with monitoring tools to get insights into application performance
and health.
Scaling Applications: Dynamically scaling applications based on demand through API calls.
5. Examples of API Calls
Create a Virtual Machine: Use the Compute API to create a new VM.
Scale an App Service: Adjust the instance count for an Azure App Service based on current load.
6. Documentation and Resources
Microsoft Docs: The official Microsoft documentation provides comprehensive guides and references for
using the Azure APIs.
Samples and Tutorials: Azure’s GitHub repositories often contain sample projects that demonstrate how to
use the Service Runtime APIs effectively.
6 WINDOWS AZURE DEVELOPER PORTAL
The developer portal is an automatically generated, fully customizable website with the documentation of your APIs.
It is where API consumers can discover your APIs, learn how to use them, and request access. Windows Azure
Developer Portal is the unified management interface for Azure, providing a graphical user interface (GUI) for users
to manage and monitor their Azure resources and services.
Key Features of the Azure Developer Portal
1. API Management:
o API Creation and Publishing: Developers can create and publish APIs, making them available for
consumption by internal teams or external partners.
o Documentation Generation: Automatically generate documentation for APIs, which helps
consumers understand how to use them effectively.
2. Developer Engagement:
o Developer Registration: External developers can register to use your APIs, which helps manage
access and usage.
o Subscriptions: Control how developers interact with your APIs through different subscription tiers,
enabling rate limiting and access control.
3. Analytics and Monitoring:
o Usage Analytics: Monitor API usage and performance through built-in analytics, helping to
understand how your APIs are being utilized.
o Alerts and Notifications: Set up alerts for certain thresholds or performance issues.
4. Testing Tools:
o API Testing: The portal provides tools for testing APIs directly within the interface, making it easier
for developers to validate functionality before deployment.
5. Custom Branding:
o Customize the portal's appearance to align with your organization's branding, providing a seamless
experience for developers using your APIs.
6. Security:
o Authentication: Implement various authentication methods to secure access to your APIs, including
OAuth 2.0, API keys, and more.
Transition to Azure API Management
In recent years, Microsoft has enhanced the Azure Developer Portal as part of the Azure API Management service.
This modern approach offers a more robust set of features, including:
Versioning and Revision Management: Easily manage different versions of your APIs.
Policy Configuration: Define policies for rate limiting, caching, and transforming requests and responses.
Developer Portal Customization: A more flexible and customizable portal for developers to access API
documentation and resources.
Getting Started with Azure Developer Portal
1. Set Up Azure Account: Create an Azure account if you don’t already have one.
2. Create an API Management Instance: Use the Azure portal to create an instance of Azure API
Management.
3. Publish APIs: Add APIs to your API Management instance and configure them.
4. Customize Developer Portal: Modify the portal's appearance and functionality to suit your needs.
5. Monitor and Analyze: Use the built-in analytics tools to monitor usage and performance.
The Azure Service Management API plays a crucial role in enabling automation, orchestration, and
management of Azure resources, empowering developers and administrators to build scalable and efficient
cloud solutions. It provides a programmatic way to manage Azure resources. While it's historically
associated with classic Azure services (also known as Azure Service Management or ASM), the more
modern approach involves the Azure Resource Manager (ARM).
Key Features of the Service Management API
1. Resource Management:
o Allows you to create, update, and delete various Azure resources, including virtual machines,
cloud services, storage accounts, and networks.
2. Service Operations:
o Manage the lifecycle of cloud services, including deployment, role management, and
configuration.
3. Authentication:
o Uses Azure Active Directory (AAD) for securing API access and managing permissions.
4. Monitoring and Diagnostics:
o Retrieve metrics and logs for your Azure resources to monitor their performance and health.
Common Operations
Creating Resources: Programmatically create resources like VMs and storage accounts.
Updating Resources: Change configurations of existing resources.
Deleting Resources: Remove resources that are no longer needed.
Listing Resources: Retrieve lists of available resources, including their statuses.
Transition to Azure Resource Manager (ARM)
While the Service Management API was commonly used in the early days of Azure, Microsoft encourages
the use of the Azure Resource Manager (ARM) API for new applications. ARM provides several
advantages:
Resource Grouping: Manage resources as a group for better organization.
Tagging: Apply metadata to resources for better management and billing.
Declarative Syntax: Use templates (ARM templates) for infrastructure as code.
Role-Based Access Control (RBAC): More granular access control for users and applications.
Using the Azure Management API
To use the Service Management API, you typically follow these steps:
1. Authenticate: Obtain an access token via Azure Active Directory.
2. Make API Calls: Use the appropriate endpoints to perform operations on resources.
3. Handle Responses: Process the responses returned by the API.
Example API Calls
Creating a Virtual Machine:
o Send a POST request to the appropriate endpoint with the VM configuration.
Listing Virtual Machines:
o Send a GET request to retrieve a list of VMs in a specific subscription.
1. Scalability: Azure Storage is highly scalable, allowing businesses to store and manage massive amounts of
data. It automatically scales to accommodate growing data volumes without manual intervention.
2. Durability: Data in Azure Storage is designed for high durability. It replicates data across different storage
nodes within the same data center and optionally across different datacenters for disaster recovery purposes.
3. Availability: Azure Storage ensures high availability by providing redundant copies of data. It offers strong
consistency guarantees, ensuring that data is always accessible even during maintenance or failures.
4. Security: Azure Storage provides robust security mechanisms to protect data at rest and in transit. It supports
encryption, role-based access control (RBAC), and integration with Azure Active Directory (Azure AD) for
identity management.
5. Flexibility: It supports various types of data storage including blobs (Binary Large Objects), tables, queues,
and files. Each type is optimized for specific data access patterns and scenarios, providing flexibility in
application development.
6. Performance: Azure Storage offers low-latency access to data, making it suitable for latency-sensitive
applications. It supports geo-replication for improved read performance across different regions.
7. Cost-Effectiveness: It provides tiered storage options based on data access frequency and performance
requirements, allowing businesses to optimize storage costs. Pricing is based on usage, providing cost-
effective storage solutions.
8. Integration: Azure Storage integrates seamlessly with other Azure services and third-party applications
through REST APIs, SDKs (Software Development Kits), and command-line tools. This integration
facilitates data management and application development in the cloud.
9. Monitoring and Management: Azure Storage provides monitoring capabilities through Azure Monitor,
allowing businesses to track storage metrics, set alerts, and analyze usage patterns. It also offers management
tools for automated provisioning, configuration, and scaling of storage resources.
10. Compliance: It meets various compliance standards and certifications, such as GDPR, HIPAA, and ISO,
ensuring that businesses can store sensitive data in a compliant manner.
9 STORAGE SERVICES
In Azure, the term “Storage type” refers to the different types of storage services offered by Azure to store data.
These types of storage services vary in their performance, durability, and cost characteristics, and are designed to
meet specific data storage needs.
The following are the main storage types in Azure:
Block blobs can be used for documents, image files, and video file storage. Append blobs are similar to block blobs,
but are more often used for append operations like logging. Page blobs are used for objects meant for frequent read-
write operations. Page blobs are therefore used in Azure VMs to store OS and data disks.
Key Features of Blob Storage
It can store and serve unlimited amounts of unstructured data.
Offers high durability through automatic and configurable data replication.
Provides secure and fast access to data through HTTP/HTTPS and REST APIs.
Supports multiple data types including block blobs, append blobs, and page blobs.
Pay-as-you-go pricing based on data usage and storage.
Can integrate with other Azure services, such as Azure Functions and Azure Data Lake.
Supports encryption of data at rest and in transit, and also role-based access control.
Applications of Blob Storage
Storing and serving large files such as images, audio, and video.
As a highly durable data storage, Blob storage can be used to store backup data.
Storing large data sets for processing and analysis with tools such as Azure Data Lake.
Azure File Storage (Azure Files)
Azure File Storage is meant for legacy applications. Azure VMs and services share their data via mounted file shares,
while on-premise applications access the files using the File Service REST API. Azure File Storage offers file shares
in the cloud using the standard SMB protocol and supports both SMB 3.0 and SMB 2.1.
Key Features of File Storage
Multiple replicas of data are maintained to ensure data availability even in the event of hardware
failures.
It can store and serve unlimited amounts of data.
Supports encryption of data in transit and at rest, and role-based access control.
It can be used with other Azure services, such as virtual machines and Azure Functions.
Can be accessed from anywhere over SMB, REST APIs, or client libraries.
Pay-as-you-go pricing based on data usage and storage.
Applications of File Storage
Providing network file shares for cloud-based applications.
Migrating on-premises file servers to the cloud.
Storing application data, such as user profiles, documents, and images.
Azure Queue Storage (Azure Queues)
The Azure Queue Storage service is used to exchange messages between components either in the cloud or on-
premise (compare to Amazon’s SQS). You can store large numbers of messages to be shared between independent
components of applications and communicated asynchronously via HTTP or HTTPS. Typical use cases of Queue
Storage include processing backlog messages or exchanging messages between Azure Web roles and Worker roles.
Key Features of Queue Storage
Can store and retrieve millions of messages.
Offers high durability through automatic and configurable data replication.
Provides secure and fast access to messages through REST APIs or client libraries.
Supports asynchronous communication between microservices to handle workloads in parallel.
Pay-as-you-go pricing based on data usage and storage.
It can be integrated with other Azure services, such as Azure Functions and Azure Event Grid.
Supports data encryption in transit and at rest, and role-based access control.
Applications of Queue Storage
Queues can schedule and manage tasks in a scalable and reliable manner.
By distributing tasks across multiple consumers, queues can be used to balance workloads and
distribute processing.
Queues can be used to decouple communication between microservices, allowing for independent
scaling and maintenance of each service.
Azure Table Storage (Azure Tables)
Azure Table Storage, as the name indicates, is preferred for tabular data, which is ideal for key-value NoSQL data
storage. Table Storage is massively scalable and extremely easy to use. Like other NoSQL data stores, it is schema-
less and accessed via a REST API. Azure Table Storage is now part of Azure Cosmos DB.
Key Features of Table Storage
Can store and retrieve billions of entities.
Supports schemaless data storage, allowing for flexible and evolving data structures.
Offers fast and predictable query performance for key-value and structured data.
Pay-as-you-go pricing based on data usage and storage.
Provides secure and fast access to data through REST APIs or client libraries.
It can be integrated with other Azure services, such as Azure Functions and Azure Event Grid.
Supports data encryption in transit and at rest, and role-based access control.
Applications of Table Storage
Storing structured data, such as product catalogs, user profiles, and event logs.
Storing session state for web applications and services.
Storing and processing data for real-time analytics and reporting.
Azure Disk Storage (Azure Disks)
Azure Disk Storage allows data to be persistently stored and accessed from an attached virtual hard disk. The
available types of disks are ultra-disks, premium solid-state drives (SSD), standard SSDs, and standard hard disk
drives (HDD). Azure-managed disks are stored as page blobs, which are a random IO storage object in Azure.
Key Features of Disk Storage
Offers high durability through automatic and configurable data replication.
Provides fast and predictable disk performance, with low latency and high throughput.
Can scale up to provide additional storage capacity as needed.
Pay-as-you-go pricing based on data usage and storage.
Can be easily attached to and detached from VMs, allowing for flexible storage management.
Supports encryption of data in transit and at rest.
Applications of Disk Storage
Storing and managing data for Azure VMs, including operating system disks and data disks.
Storing and managing data for databases, such as SQL Server, Oracle, and NoSQL databases.
Storing and managing data for applications, such as web applications, mobile applications, and big data
applications.
10 REST API
Azure provides a variety of REST APIs that developers can use to interact with and manage Azure resources
programmatically. These APIs follow the principles of Representational State Transfer (REST) and typically use
JSON (JavaScript Object Notation) for data exchange. REST APIs offer simple and standardized approach to
communication. REST APIs are scalable and stateless. REST APIs have high performance in large part due to the fact
that they support caching.
Some APIs, such as SOAP or XML-RPC, impose a strict framework on developers, but REST APIs can be developed
using virtually any programming language and support a variety of data formats. The only requirement is that they
should align to the following six REST design principles, also known as architectural constraints:
1. Client-Server: In REST API design, client and server applications must be completely independent of each other.
This creates a separation of concerns, letting each application grow and scale independently of the other and
allowing your organization to grow quickly and efficiently.
2. Stateless: REST APIs are stateless, meaning that each request needs to include all the information necessary for
processing it. A REST API should not rely on data being stored on the server or sessions to determine what to do
with a call, but should rather solely rely on the data that is provided in that call itself. It means that no data is
stored on the server related to the client request.
3. Cache: When possible, resources should be cacheable on the client or server-side. The goal is to improve
performance on the client-side while increasing scalability on the server-side.
4. Uniform interface: The uniform interface lets the client talk to the server in a single language, independent of the
architectural back-end of either.
5. Layered system: Don’t assume that the client and server applications connect directly to each other. There may
be a number of different intermediaries in the communication loop. REST APIs need to be designed so that
neither the client nor the server can tell whether it communicates with the end application or an intermediary.
6. Code on demand (optional): REST APIs usually send static resources, but in certain cases, responses can also
contain executable code (such as Java applets). In these cases, the code should only run on-demand.
You can access objects in Blob Storage via HTTP/HTTPS anywhere in the world through Azure Storage REST API,
Azure CLI, Azure PowerShell, or an Azure Storage client library. You can also access client libraries through
different languages, which include .NET, Node.js, Java, Python, PHP, Ruby, and Go. Microsoft Blob Storage allows
large file transfers through a network by splitting the files into smaller pieces when uploaded. Once uploaded to the
cloud server, they appear together in one file.
Blob Containers: Blobs are grouped in containers that organize a set of blobs the same way a file system directory
arranges files. Think of a blob container as a drawer where you can manage files. You might use one container to
store audio files and another to store video files. One storage account can include unlimited containers, and a
container can keep unlimited blobs. Containers are a form of cloud computing and are self-contained, which means
they have all the dependencies they need. The maximum amount of data a container can hold is 500 TB. The name of
your container must be a valid DNS name because it forms the unique resource identifier (URI) that identifies the
container and its blobs. Microsoft suggests several rules to follow when naming a container: Names of containers
must be between 3 and 63 characters. The names must start with a letter or number. The container name will contain
only lowercase letters, numbers, and the dash sign (-). You cannot have two or more consecutive dash characters.
Types of Blob Storage: Microsoft Azure offers three types of Blob Storage: block blobs, append blobs, and page
blobs. When you create a blob, you specify which kind of blob you want; once you make it, you can no longer change
its type. You can only update the blob using the operations appropriate for each kind of blob. Let’s learn more about
the different types of blobs and what they do.
Block blobs :Subdivided into blocks, block blobs are best for storing media files, text files, documents, and
binary files. The blocks can be different sizes, but the current maximum is 4000 MiB (mebibytes) per block.
A block blob can contain up to 50,000 blocks. A block uploaded to your storage account is associated with
the specific block blob, but it only becomes a part of the blob when you commit a list of blocks, including the
new block’s ID. It remains uncommitted until you save or discard it. There can be up to 100,000 uncommitted
blocks.
Page blobs: A collection of 512-byte pages, page blobs are mainly for random read and write operations. If
you want to create a page blob, you choose a page blob and write the maximum size the blob will grow.
Unlike a block blob, write-to-page blobs happen immediately and are committed directly to the blob. The
total size for a page blob is 8 TiB (tebibytes).
Append blobs: Append blobs have blocks but are designed for append operations, with storage and log file
updating as their most common uses. You can append a block, adding the block to the end of the blob using
the Append Block operation. However, you can’t update or delete existing blocks. Blocks can be different
sizes, each up to a maximum of 4 MiB. Like block blobs, append blobs can include up to 50,000 blocks.