Get an overview of Azure storage, including the various tiers and the difference between standard and premium storage. Other topics include the different types of Azure storage and how each type is used.
- [Teacher] As we're creating all of our objects in Azure, we need a place to store them. This is where we can leverage Azure Storage. Azure Storage is massively scalable, and you only pay for what you use. There is no reason to over-provision for that "what if" scenario. Storage is accessible from anywhere, and one of the other nice things about Azure Storage is that your data is automatically load balanced based on the traffic using an auto-partitioning system. We'll talk about that a little bit later. This means Azure provides the resources needed as your application grows.
There are four types of storage services within Azure. There's the container blob service, the queue service, the files service, and the table service. Let's explore each of these a little bit further. First, we have the container blob service. The blob service provides storage for unstructured files, including your virtual machine disk, backups, logs, and media files. And there are three types of blobs within the container blob service. There are the block blobs, which are optimized for sequential access.
These are great for media content. Our virtual machine disk uses page blobs because of the random access functionality. And we have append blobs, which are best for logs and auditing activities. This type of blob appends data that does not require the existing data to be modified. And your blobs can be streamed using the Downloads to Stream API. Let's look at the typical hierarchy for our blob storage. First of all, we have a storage account. In our example, I'm using User1 as a storage account.
Then we're going to create containers within that storage account. In my example, I have photos, docs, and movies, and within our container, we have blobs, which are just files. In our example here, we have two image blobs, we have two text blobs, one being a PDF, one being TXT, and then we have one movie AVI. Next, we have queue storage, which is a messaging solution for asynchronous communications between Cloud, Desktop, on premise servers, and mobile devices.
Messages can be accessed from anywhere using authenticated calls with HTTP or HTTPS. Common use cases include transferring messages from Azure Web Roles to Azure Worker Roles, both of which are out of scope for this course. But because we're just transferring messages, it is only temporary storage, and messages are processed one at a time. And here is an example of a hierarchy for our queue storage. We're going to start off with that storage account. Again, I'm using User1 as our example.
Next, we'll have our queues; I have two here. I have Thumbnails and Links. And then we have our messages contained within our queues. Next, we have our file service, and the beauty of the Azure Blob file service is you can treat the storage just like your already familiar Windows file shares. You can mount and manage your shares using the same tools you already use, and it is easy to set up. Microsoft does recommend that you use HTTPS, and this uses the SMB 3.0 protocol.
The file storage hierarchy is probably going to look very familiar to most of you. First of all, we'll have our storage account. Within our storage account, we'll have our shares. In my example, I'm using HR and Financials. Then we'll have our directories. So in HR, I have Training and Hiring, and in Financials, we have 2016. And then we have all of our files. The directories are optional, but I like to keep my files organized by directory. But that will be your choice. And finally, we have the Azure Table service, which stores structured NoSQL data.
It uses the key/attribute without a schema, and we have flexible datasets, meaning that it will work well with web apps and address books. And the typical hierarchy for table service will include, again, the storage account, our tables, and then our entities within those tables. In my example here, I have Clients, and the entity associated with that client will be the name and phone. And then I have Pictures, so I have a picture ID and a location. Azure Storage supports HTTP and HTTPS, but HTTPS is recommended, and authentication is required to access data.
And you can use Shared Key and Shared Key Lite for authentication to secure the access to storage services. The Shared Key Lite is used for code that is written prior to September 2009. You can read and change the data within your storage services. You can do it using a browser, Visual Studio, or other applications. My current favorite right now just happens to be the Microsoft Azure Storage explorer. You can change data using the Storage API or Storage Client Library, and all the updates are atomic, meaning previously committed data will be returned while the blob is being updated.
Just as our regular on premise storage, you're going to be transferring data back and forth. Azure Storage uses the copy blob operation, which uses Asynchronous copy, or Async, and it copies the entire source blob or file. Ranges are not supported. And finally, we're going to close off our quick overview of Azure Storage with scale and load balancing. Azure Storage will scale and load balance automatically, and does so using partitioning. This is achieved because the object in the storage belongs to a partition, and it's this partition that determines how the storage service is balanced across the servers.
For our blob service, each blob has its own partition, and can spread across multiple servers for scaling. When we're using the table service, the partition includes all the entities within the same partition key. For our queues, all the messages are grouped together into a partition, which is serviced by one server. And for our files, all the files in a share are in a single partition. Azure Storage is a key component of your infrastructure within Azure. This is where we house our virtual machines, our files.
For those of you who are into some Dove, tables and queues will be critical for you. We could spend hours talking about Azure Storage, but for this course, we're going to keep it fairly light. And for those of you who would like to spend more time in Azure Storage, I've provided some links in the handouts for you to reference.
- Implementing storage blobs and Azure files
- Managing access
- Configuring diagnostics, monitoring, and analytics
- Enabling and viewing logs
- Implementing Azure SQL databases
- Implementing recovery services
- Creating an Azure Backup vault
- Configuring the Azure Backup agent
- Backing up and restoring files
- Backing up an Azure virtual machine