Book Image

Learning Microsoft Azure

By : Geoff Webber Cross, Geoff Webber-Cross
Book Image

Learning Microsoft Azure

By: Geoff Webber Cross, Geoff Webber-Cross

Overview of this book

Table of Contents (19 chapters)
Learning Microsoft Azure
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Examining Microsoft Azure Services


We'll start taking a look at all the Microsoft Azure services available to us; while we do this, it's helpful to refer to the portal, and use the +NEW button to see the different options for each category. Don't be afraid to create a service to take a closer look; you can always delete it afterwards.

Compute services

Compute services are a collection of services used for building different types of scalable, resilient applications on Microsoft Azure. We'll take a look at these now and see what they can offer us.

Websites

Microsoft Azure websites are a secure, scalable platform for publishing websites on a number of platforms (ASP.NET, PHP, Node.js, Python, and Classic ASP) with SQL Server and MySQL databases; there is also a large gallery of website templates for building websites on app frameworks such as Django, blog sites such as WordPress, and forums such as phpBB; to see the full list, click on the New Service button, and then navigate to COMPUTE | WEB SITE | FROM GALLERY.

Websites support SSL certificates for secure HTTPS sessions and custom domain names with A and CNAME records (for supporting a single domain name for a number of load-balanced web servers). Website instances can be manually or automatically (on schedule or on CPU metrics) scaled up and down to meet business demands. Websites can run in three modes, FREE, SHARED, or STANDARD, where FREE and SHARED run on a multitenant environment (a shared web server), but the SHARED mode has a higher resource quota than FREE. STANDARD runs on a dedicated virtual machine (small, medium, large size options similar to virtual machines).

Virtual machines

Virtual machines offer you a scalable server infrastructure to build your systems from scratch. They are available as Windows Server or Linux operating systems, and there are a number of images available with server software such as SharePoint, SQL Server, and Oracle preinstalled. To take a look at the complete list, click on the New Service button, and then navigate to COMPUTE | VIRTUAL MACHINE | FROM GALLERY.

There are currently eight image sizes ranging from extra small (shared core, 768 MB RAM) to A7 (eight cores, 56 GB RAM) and default (one core, 1.75 GB RAM); obviously, the bigger the image, the higher the cost. You can see the prices in the pricing calculator at http://www.windowsazure.com/en-us/pricing/calculator/?scenario=virtual-machines. Virtual machines are charged at compute hours and have a monthly value in the calculator; Windows Server and Linux images cost the same, but the price increases with additional server software due to the extra licensing cost.

Mobile services

Mobile services are designed for mobile app developers so that they have a simple platform to quickly create secure (OAuth2 and key-based authentication over SSL) database and custom APIs and easily make push notification requests on all major mobile platforms (Windows Store, Windows Phone, iOS, and Android). Backend services can be created on Node.js or .NET; Node.js, which is the original platform, can be scripted in the portal directly or locally, and can be pushed using Git version control, whereas .NET backends, which are a relatively new addition, are created locally and published in a similar way to other web applications.

There's a complete set of SDKs for integrating mobile applications and other backend services for a growing number of platforms including Windows Store, Windows Phone, iOS, Android, Xamarin, HTML, and Sencha.

I recently wrote an entire book on this subject, which is available from Packt Publishing at http://www.packtpub.com/learning-windows-azure-mobile-services-for-windows-8-and-windows-phone-8/book.

Cloud services

Cloud services allow you to create scalable applications that have a high availability (99.95 percent monthly SLA). There are two main types of cloud services: web role and worker role. Web roles are web applications hosted on IIS in their own environment. They are different from normal websites as they have extra capabilities listed in the following bullet list (although websites can now be staged too), to start with web roles can start life as a website, then easily be added to a web role at a later stage if they require these additional capabilities. Worker roles are a bit like Windows Services, where they are applications with no user interface, which can perform long-running tasks from things such as processing data of a table to hosting a proprietary TCP server. Cloud service roles have the following characteristics:

  • They run on their own virtual machine

  • They can be scaled as required

  • They can be deployed to multideployment environments (staging and live)

  • They allow remote desktop onto their virtual machines

  • They execute start-up tasks

Data services

Data services are a collection of data-storage-related services including fully relational SQL Server Database, table storage, various Binary Large Objects (blobs) and disk-storage options, and storage queues. We'll take a look at each one in more detail now.

SQL Server Database

Microsoft Azure SQL Database is a fully managed, highly scalable relational database with a high availability (99.95 percent SLA). Microsoft Azure SQL Server is very similar to a SQL Server in terms of Transact-SQL (TSQL) and Tabular Data Stream (TDS) but has a number of features it does not support, such as:

  • Backup and restore (this will be supported when the new service tiers are made available)

  • Replication

  • Extended stored procedures

  • SQL Server agent/jobs

A full list of differences can be found here, although it doesn't currently mention SQL Server 2012 or 2014: http://msdn.microsoft.com/en-us/library/ff394115.aspx.

Databases are available in three tiers of service:

  • Web: This is a scalable managed database up to 10 MB

  • Business editions: These are scalable managed databases up to 150 GB

  • Premium edition: This is the same as premium editions but with reserved resource capacity for applications that may have a high peak loading, many concurrent requests, or require guaranteed low request latency

Databases benefit from having two data center replicas (for any tier of service) and the option to scale out as required (splitting large databases across multiple servers to improve performance).

Storages

Microsoft Azure storage offers resilient, scalable storage for unstructured text and binary data such as logfiles, images, and videos. There are four types of storages:

  • Block blobs: This is the simplest way of storing large volumes of nonstructured data. Blobs can be accessed through managed SDKs and from anywhere via REST APIs. Block blobs are made up of a maximum of 50,000 blocks, having a size of up to 4 MB each, with a maximum total size of 200 GB.

  • Page blobs and disks: Page blobs are optimized for frequent updates and random access and are actually used as the storage media for Microsoft Azure VHD disks. Page blobs are collections of 512 byte pages; pages worth 1 to 4 MB can be written in one go and a maximum of 1 TB is available for a single blob.

  • Tables: Tables are a NoSQL (a nonrelational database) way of storing data, rather than storing data in a relational way, like in a traditional SQL Server Database, where we have tables, which have relationships with other tables via primary and foreign keys; Microsoft Azure tables allow you to create a container table, and then define classes that belong to it. These classes have a partition key, row key, and timestamp property, which allow them to be queried. Microsoft Azure tables allow us to store large amounts of data in a highly scalable way while still allowing efficient querying.

  • Queues: Queues are a messaging system that allows processes to exchange data between tiers of a system via a message queue. They are helpful for building scalable worker processes. Queues can be accessed via native SDKs and REST services.

HDInsight

HDInsight is a relatively new addition to the Microsoft Azure service family; it is a service based on Apache Hadoop (http://hadoop.apache.org/), which helps us integrate multiple data sources of different types and structures into Microsoft Business Intelligence (BI) tools such as Power Pivot and Power View.

Cache

Microsoft Azure Cache is a high-performance, in-memory distributed cache that allows scaled-out applications to share data without having to use a database. This can be useful for adding session state and page caching to ASP.NET applications (although session state is not generally a good practice for modern web applications, it may be useful for legacy applications or if you really can't live without it!) and also doing your own custom caching in worker roles for maintaining the state across instances. Cache is available in three tiers:

  • Basic: This is a shared cache with a size ranging from 128 MB to 1 GB

  • Standard: This is a dedicated cache with a size ranging from 1 GB to 10 GB

  • Premium: This is a dedicated cache with a size ranging from 5 GB to 150 GB

Recovery services

The recovery services allow you to create Hyper-V recovery manager vaults, which allow you to back up your Hyper-V system to the Microsoft Azure cloud and backup vaults, which can be used for backing up files and folders from servers.

App services

App services are a collection of services that help cloud and on-premises applications and services to interact with each other. They can be implemented on systems ranging from media-streaming services to multi-tier enterprise business systems. We'll look at each of these now.

Media services

Media services provide a scalable media processing workflow for digital media systems such as video-streaming services, from ingest through encoding, format conversion, and content protection, to on-demand and live streaming.

Service Bus

Service Bus is a collection of services used for enabling communication between different processes in distributed, multi-tier systems. The various Service Buses are as follows:

  • Queue: Service Bus queues as with .NET queues are first in, first out (FIFO) collections of messages that allow applications to communicate with each other asynchronously by publishing and consuming messages. This can be very helpful for building scalable systems across multiple tiers especially when part of the system may not always be online. It can also help with load leveling, where a consuming application can process batches of data in a controlled way rather than being driven by the producing application. Messages are processed by a single consumer and can be read in the ReceiveAndDelete mode, where the message will immediately be marked as consumed and returned to the provider and the PeekLock mode, where a consumer can get a temporary lock while it processes the request; then, if it cannot process the message, it can abandon it, or if it fails completely, the message will time out, allowing another process to consume it.

  • Topic: In contrast to queues, where we have a one-to-one relationship between a provider and a consumer, topics have a one-to-many relationship, where we create a topic with a number of subscriptions. Then, a provider can send messages to the topic, and subscribing clients can receive messages from subscriptions they are interested in.

  • Relay: Relays are different from topics and queues in that they don't offer disconnected services; instead, they can securely expose on-premises service endpoints, allowing them to be accessed directly by applications in the cloud.

  • Notification Hub: The Notification Hub service is a really nice way of handling push notifications to mobile apps from backend services in an efficient, scalable manner. Mobile apps on all major platforms can register to receive push notifications (in the case of Windows Store and Windows Phone applications, these are Toast, Tile, Badge, and Raw notifications), and from the backend service, just one request per platform is required to make the request rather than making requests per subscribed channel. The Notifications Hub also has a tagging feature, where users can subscribe to certain tagged topics and also template notifications, which can be used for localization support. The Notifications Hub handles all communications with the native Push Notification Services (PNS).

Visual Studio Online

Visual Studio Online services allow Visual Studio Online accounts to be integrated into Microsoft Azure, enabling us to view, build, and load the testing status in the dashboard and enable continuous deployment so that websites can be deployed to a test environment on build when code is checked in.

BizTalk Services

BizTalk Services allow on-premises applications to interact with each other via the cloud, providing messaging endpoints and transforming messages between services for interoperability.

Scheduler

The scheduler allows scheduled jobs to be created to perform operations such as making HTTP requests and performing actions on storage queues. Jobs can be scheduled to run once on demand, at a specific time, or at various intervals.

Active Directory (AD)

The following are the features of Azure AD:

  • Azure AD allows you to manage user credentials and application access in your Microsoft Azure system. It is an Azure-specific, REST-based implementation of Active Directory, which is used with on-premises systems.

  • Access Control Service (ACS) provide an easy way of authorizing and authenticating users with support for the following authentication mechanisms:

    • Windows Identity Foundation (WIF)

    • Built-in support for Microsoft Account, Google, Yahoo, Facebook, and Twitter

    • Active Directory Federated Services (ADFS)

    • OAuth 2.0

    • JSON Web Token (JWT), SAML 1.1, SAML 2.0, and Simple Web Token (SWT)

    ACS also offers Home Realm Discovery, allowing users to choose an identity provider, an OData-based management service, and a browser-based management portal.

  • Multifactor authentication is an extra layer of security for applications. If you have a Windows Store account, you must have noticed that a PIN is sent to a configured mobile phone or e-mail address, which you must enter before signing in with your Microsoft account. This can be added to on-premises applications using ADFS, and to systems integrated with Windows Azure AD.

Network services

Network services are a collection of services related to networking between services, and allow us to create virtual networks and load balance traffic across services in different Azure locations.

Virtual Network

Virtual Network allows you to create a private IPv4 network space in Azure, securely extend your on-premises networks into Azure, and configure a custom DNS server for services on Virtual Network.

Traffic Manager

Traffic Manager allows user traffic to be distributed to the most appropriate cloud service or website within the same data center or across global data centers depending on the load-balancing method chosen. Traffic management requires one of the following three load-balancing methods:

  • Performance: This allows users to be redirected to the closest geographic endpoints

  • Round-Robin: This evenly distributes traffic between services

  • Failover: If a service fails or goes offline, requests will be rerouted to another service