Get an introduction to the Microsoft Azure cloud storage service known as Azure Storage and its various storage services. Look at Azure Storage with the broader family of relational and NoSQL storage options generally referred to as databases, and explore pricing and documentation websites.
- [Instructor] Microsoft Azure Storage is a cloud-based service for persisting and retrieving data, so storing and reading objects of various kinds through the cloud infrastructure. An Azure Storage account is the element that you will see in the Azure Portal. The resource manager creates Azure Storage account resources, and it is the configuration element where we will start for creating storage elements like blobs, tables, queues, and file shares. There are two different kinds of storage accounts.
One is considered a general-purpose storage account. A general-purpose storage account gives you all of the capabilities of blobs, tables, queues, disks, file shares, and so forth, and they come in two flavors. One is premium as a general-purpose storage account, which is backed by SSDs. So for the blobs that contain our disks, specifically the virtual machine, virtual hard disks, we can have them placed on solid-state storage or premium storage where we get the best possible performance. There's also a standard variation, which is for traditional spinning magnetic disk types of drives.
And it's also what we will use most of the time for blobs, queues, tables when we just have a general-purpose use case. The other type is blob-specific storage accounts. When we don't need all the other capabilities, if we only want blobs, then we can create a storage account specifically off type blob storage. Then we get specialized capabilities for blobs like tiering. Tiering means that we can change the tier of the blob so that we can control what kind of cost implications we have based on our application's usage patterns.
We have hot, cool, and archive tiers. So we can design for whether we have frequent access we want to cost optimize for that, or whether we have long-term storage we'd like to cost optimize for that. For the latest information about the capabilities of the general-purpose storage account do take a look at the documentation. At the time of this recording there is already a version two of the general-purpose storage account with new features. And the blob storage account now has hot, cool, and archive tiers.
Azure storage accounts have different APIs for talking to the storage subsystem. And there are essentially five options for us as developers. We have blobs, binary large objects. These are files of various kinds, media files, documents, stuff like that that's considered unstructured. We have table storage where the API gives us a way of working with structured data. This essentially a NoSQL database. We have queues, which is essentially messaging for applications, or email between applications.
And we have files, a traditional file share. It looks very much like a network file server. So we can easily migrate applications that require file shares into Azure by just using Azure file storage. There is always Azure storage disks for use from inside a virtual machine. You can actually create a virtual hard drive in Azure storage and attach it to a virtual machine. And it behaves exactly like a virtual hard drive. Azure Storage blobs is a highly scalable store for unstructured data of massive scale, millions of objects, hundreds of terabytes worth of storage.
And the key thing here is that if we pick a specialized blob storage account, then we can control the tiering, the hot, cool, or archive mode of individual blobs. Azure storage tables is a NoSQL and schemaless key-value store. So if you're comfortable with NoSQL databases, then Azure Storage tables would be quite comfortable. But, essentially, it means storing structured data. And we're storing that structured data in the Table API, where we have the capability to then query or make updates to that data.
Now, there is the Cosmos DB, which is a multimodal, meaning data structures of different kind or APIs to data of different kind all put into one. And the Table API, which looks exactly like Azure Storage Tables will be a part of Cosmos DB. So in addition to a schemaless key-value store, a NoSQL table API, we will also get Column-Family, documents, graph APIs, and such things. So it's worth looking at Cosmos DB, especially if you've previously used DocumentDB, MongoDB, or in this case now the Table API.
Azure Storage queues is essentially messaging for applications. If you think of applications communicating with each other in the same style of email, so asynchronously by message passing, then Azure Storage queues is that messaging for applications. It is durable in that messages are in fact stored. And we follow the typical queuing semantics of enqueuing a message by adding it to a queue and dequeuing a message by reading a message, retrieving a message from a queue. It does support significant parallelization, so we can actually have multiple clients reading and adding messages to and from queues.
And it's a great pattern for decoupling components, so the idea of having an application sending messages to another application without both applications having to be available at the same time or even able to communicate at the same rates. Azure Storage files is quite literally a network share in the cloud, so an SMB, sort of a message block file share. What you're used to of Windows where you say net use, or on Linux, the C-I-F-S file shares, CIFS file shares. So whether you call it a file share or a network share, the idea of using a network available file sharing service, this is available in Azure Storage files.
And because it supports SMB you can take traditional applications or legacy applications that to date depend on file shares, and move them as they are into the cloud without having to build your own file server. Azure Storage also has a type of blob called a page blob, as opposed to a block blob. Azure Storage blobs are generally block blobs. In this case we're talking about a page blob in the same sense of having pages on disks. Page blobs are quite literally for storing virtual hard drives, the virtual disks used by virtual machines.
They're essentially classic in the sense that Azure Storage has the ability to store virtual disks. Or they can be managed in that virtual disks can be managed. So then you don't have to care about which storage account it's on or whether it's competing for resources with other disks, or anything like that. So you will see classic, or unmanaged disks in Azure Storage accounts from time to time. When you are using virtual disks you will be aware of the distinction between premium and standard. Premium being SSD-based, or having the high-performance disks, and standard being the traditional spinning magnetic platter disks.
All Azure Storage is triple replicated in the local data center. That's particularly important for virtual machines. So as the virtual machine is running any write to disk actually goes to three storage nodes. This means that your Azure Storage, and in this case Azure Storage disks in particular are essentially in something equivalent to a wide volume. So you can be assured of durability. And if you want you can have further replication for redundant or similar. Now Azure Storage was one of the foundational services and the first ones available with Azure.
But that's not the only service. So do still consider things like Azure SQL, Redis, and so forth because these database systems provide additional layers of services or higher level abstractions. So whether it's ACID transactions, or full text search, or any of these capabilities you might still be interested in database management systems in addition to just overall storage. Azure Storage is surprisingly affordable, especially given the performance we can get out of it and scale that comes with it. But you do have to plan for the cost of using Azure Storage.
So you have to be aware of the Azure Storage types and the cost implications for that. The degree of redundancy you select has an impact on the cost. And, also, the region might impact the cost of your storage. Typically, though, the major component is the size of what you consume in terms of storage, so the price per gigabyte essentially. But given that you are a developer you will know how you're going to access that storage. So the access type, the access patterns, the operations you do on that storage element, that will also have an impact on pricing.
Bear in mind that bandwidth is billed separately, so you'll look at a storage account and its costs, and the major factor will be the size, the operations on it. Those two, of course, will have a multiplication factor in terms of the redundancy you selected and so forth. But what you might not see very obviously on the storage account itself is the flow of data in and out of Azure, which is billed separately. So when you do your cost of ownership calculations bear these factors in mind. And take a look at the online storage pricing in addition to the storage calculator.
And remember to have both bandwidth and the storage account itself in your calculations. In this course we will look at Azure Storage from a developer's point of view, and take an overview of Azure Storage blobs, queues, tables, and files.
- Creating general-purpose and Blob storage accounts
- Shared key authentication
- Using shared access signatures (SAS)
- Granting privileges with stored access policies
- Encrypting data at rest
- Deploying Azure storage accounts from the command line
- Deploying Azure storage accounts using PowerShell
- Storage types, including blobs, tables, queues, and files