Microsoft Azure Storage Services.
Hi guys, today we will discuss about Microsoft azure storage services. These services are used in multitenant or cloud base applications.
What is Storage service?
Azure storage is Microsoft’s object storage solution for the cloud. Azure Storage includes object, file, disk, queue, and table storage. There are also services for hybrid storage solutions, and services to transfer, share, and back up data. We can easily handle structure and unstructured data with help of these storage services.
Azure provide following storage services.
Blob , File , Disk, Queue ,Table
Why do I need Azure Storage account?
Accessibility : The storage account provides a unique namespace for your Azure Storage data that’s accessible from anywhere in the world over HTTP or HTTPS. Data in your storage account is durable and highly available, secure, and massively scalable.
Cost : Purchasing physical storage can be expensive. Without the need for hardware cloud storage is exceptionally cheaper per GB than using external drives.
Recovery or Backup : In the event of a hard drive failure or other hardware malfunction, you can access your files on the cloud. It acts as a backup solution for your local storage on physical drives.
Auto Sync and Update : When you are working with cloud storage, every time you make changes to a file it will be synced and updated across all of your devices that you access the cloud from.
Security : Cloud storage providers add additional layers of security to their services. Since there are many people with files stored on the cloud, these providers go to added lengths to make sure your files don’t get accessed by someone who shouldn’t
Disadvantages of Cloud Storage
- Internet Connection : Cloud based storage is dependent on having an internet connection. If you are on a slow network you may have issues accessing your storage. In the event you find yourself somewhere without internet, you won’t be able to access your files.
- Costs : There are additional costs for uploading and downloading files from the cloud. These can quickly add up if you are trying to access lots of files often.
- Hard Drives : Cloud storage is supposed to eliminate our dependency on hard drives right? Well some business cloud storage providers require physical hard drives as well.
- Support : Support for cloud storage isn’t the best, especially if you are using a free version of a cloud provider. Many providers refer you to a knowledge base or FAQs.
- Privacy : When you use a cloud provider, your data is no longer on your physical storage. So who is responsible for making sure that data is secure? That’s a gray area that is still being figured out.
What is Azure Blob Storage ?
The word blob is an acronym which stands for binary large object. Blobs typically include large files that are unstructured, such as images, video, music files, backup files etc. Azure storage offers different access tiers, allowing you to store blob object data in the most cost-effective manner. Available access tiers include:
Hot — Optimized for storing data that is accessed frequently. The hot access tier has higher storage costs than cool and archive tiers, but the lowest access costs. Example usage scenarios for the hot access tier include:
- Data that’s in active use or is expected to be read from and written to frequently
- Data that’s staged for processing and eventual migration to the cool access tier
Cool — Optimized for storing data that is infrequently accessed and stored for at least 30 days. The cool access tier has lower storage costs and higher access costs compared to hot storage. This tier is intended for data that will remain in the cool tier for at least 30 days. Example usage scenarios for the cool access tier include:
- Short-term backup and disaster recovery
- Older data not used frequently but expected to be available immediately when accessed
- Large data sets that need to be stored cost effectively, while more data is being gathered for future processing
- Archive — The archive access tier has the lowest storage cost but higher data retrieval costs compared to hot and cool tiers. Data must remain in the archive tier for at least 180 days or be subject to an early deletion charge.
There are essentially 3 different types of blobs (in a nutshell):
- Block blobs
- As suggested by the name, block blobs are made of blocks. Each block has a block ID. Blocks can be different sizes, potentially up to a maximum of 4.75TB. Block clients are set to 32MB size block by default, but this can be configured using the SingleBlobUploadThresholdInBytes property.
- Block blobs are optimized for data streaming, and has some features which helps you to manage blobs such as an MD5 hash for verification or parallel uploads.
2. Append blobs
- Append blobs are used to append data. Basically, this means that each time you make changes to the blob, the data will be appended at the end of the blob. Data cannot be changed or deleted, only appended.
3. Page blobs
- A page blob consists out of pages. A page is 512 bytes, and the blob can go up to 1 TB in size.
- This is typically used for fast read and write operations.
You must choose the type of blob when you create the blob and unfortunately once the blob is created it’s not possible to change it to a different type.
What is Azure File Storage ?
Azure File Storage is a fully managed distributed file system based on the SMB protocol and looks like a typical hard drive once mounted. You can also cache file shares in on-premises Windows Servers using the Azure File Sync agent.
File storage encompasses 4 component types:
- Account : This is your Azure storage account, in which you created your main file share.
- Share : File shares created in the main file share. Share names can be 63 characters long.
- Directory : Any hierarchy of folders and directories. Directory names can be up to 255 characters long.
- Files : Any files uploaded to the share, to a maximum size of 1 TB.
What is Azure Disk Storage ?
Azure Disk Storage is the only shared cloud block storage that supports both Windows and Linux-based clustered or high-availability applications via Azure shared disks. Azure managed disks are block-level storage volumes that are managed by Azure and used with Azure Virtual Machines. Managed disks are like a physical disk in an on-premises server but, virtualized. With managed disks, all you have to do is specify the disk size, the disk type, and provision the disk. Once you provision the disk, Azure handles the rest.
The available types of disks are ultra disks, premium solid-state drives (SSD), standard SSDs, and standard hard disk drives (HDD).
Azure offers 2 types of disk storage:
Managed : Managed disk has some advantages over unmanaged disks in the sense that disks will be created and managed for you. This is a IaaS offering.
Unmanaged: With unmanaged disks, you must manage it yourself. Basically, this means that your virtual hard disks are stored in a storage account as page blobs.
What is Azure Queue Storage ?
Queue Storage is somewhat like MSMQ. It allows you to decouple your components and have reliable asynchronous communication. In Azure Queue Storage, the number of queues is only limited by the capacity of the storage account.
Queues and messages can be created programmatically or using the Storage Explorer tool.
Queue storage consists out of the following components:
- Account : This is your Azure Storage account which contains your queue storage.
- Queue : These are groups of messages; you can create multiple queues for different purposes. Queue names must be in lowercase.
- Message : This is a message placed in the queue to be processed. A message can be up to 64KB each.
What is Azure Table Storage ?
Table storage is used to store semi-structured data in a key-value format in a NoSQL datastore. Azure table storage can store petabytes of data, can scale and is inexpensive. Table storage can be accessed using REST and some of the OData protocols or using the Storage Explorer tool.
Table storage has the following components:
- URL format: Azure Table Storage accounts use this format: http://<storage account>.table.core.windows.net/<table>
- Account : This is the storage account where you wish to save your tables.
- Table : This is not a traditional table in the sense of a transactional database, this is rather a schema-less collection of entities. Table names must be unique in your account and cannot be more than 63 characters.
- Entity : An object which consists out of properties. Each entity has a partition key, a row key and a timestamp by default. An entity can store 252 properties. An entity can have a maximum size of 1MB.
- Properties : The properties are the key-value pairs. A property name must not be longer than 255 characters and is case sensitive.
Azure Table storage is a service that stores non-relational structured data (also known as structured NoSQL data) in the cloud, providing a key/attribute store with a schemaless design. Because Table storage is schemaless, it’s easy to adapt your data as the needs of your application evolve. Access to Table storage data is fast and cost-effective for many types of applications, and is typically lower in cost than traditional SQL for similar volumes of data.
You can use Table storage to store flexible datasets like user data for web applications, address books, device information, or other types of metadata your service requires. You can store any number of entities in a table, and a storage account may contain any number of tables, up to the capacity limit of the storage account.
Table Storage Concept
Storage Explorer Tool
To manage the objects on your storage you can use the free Storage Explorer tool. Since this tool is open source, you can also download the source code for it. This tool is currently still in preview and new features are added on a regular basis.
But I find it quite useful since when you are logged into your Azure account, it shows almost all information regarding the account, including the primary and secondary connection strings for each of your storage accounts.
It also allows you to create tables and queues which you cannot do directly in the Azure Portal.