Courses Job Ready Program Fresher Trainings AI For Class 7 to 12 Corporate Training Placements Tutorials
Free Learning Resources

IT Tutorials & Interview Prep

Free guides, interview Q&As, and job responsibility breakdowns — curated by industry veterans to help you crack MNC interviews

211+
Tutorial Articles
14
Topic Categories
100%
Free to Read
← Back to  Azure Administrator (AZ-104 )

Chapter 5: Azure Storage and Data Services

 Azure Administrator (AZ-104 ) Last Updated: Aug 17, 2026

5.1 Azure Files

What is Azure Files?

Definition: Azure Files is a fully managed cloud file storage service that lets you create file shares accessible over the network using the SMB (Server Message Block) and NFS (Network File System) protocols. It works like a normal shared folder, except it lives in the cloud instead of on a physical server. Multiple computers — Windows, Linux, macOS, or even on-premises servers — can connect to the same file share at the same time. Because Microsoft manages the backend hardware, patching, and availability, you don't need to buy or maintain any physical file server.

Azure Files Microsoft Azure की एक cloud-based file server service है। इसकी मदद से आप Windows shared folder की तरह file share बना सकते हैं। Server और storage को Microsoft manage करता है, इसलिए कई users और computers एक ही files को आसानी से access कर सकते हैं.

Real-Life Example: It's like a shared Google Drive folder that your whole office team can open directly as a mapped network drive (like 'Z:') instead of manually uploading and downloading files.

Benefits of Azure Files

Definition: Azure Files removes the need to buy, maintain, and patch physical file servers, since Microsoft manages the entire infrastructure. It provides built-in high availability, cross-platform support (Windows, Linux, macOS), and integrates with Azure Backup for automatic snapshots. It also supports Azure File Sync, which caches frequently used files on a local Windows Server for faster access while keeping the master copy in the cloud. Data is encrypted both at rest and in transit, helping organizations meet security and compliance requirements.

इसका सबसे बड़ा लाभ यह है कि hardware खरीदने या maintain करने की आवश्यकता नहीं होती, क्योंकि Microsoft सब कुछ manage करता है। Backup और security अपने आप मिलते हैं, जिससे समय और लागत दोनों बचते हैं.

Real-Life Example: Similar to renting a fully-serviced storage locker where the facility handles security, maintenance, and climate control — you simply bring your items and use them.

SMB and Its Versions

Definition: SMB (Server Message Block) is a network protocol used to share files, printers, and other resources over a network. Azure Files supports SMB 2.1, SMB 3.0, and SMB 3.1.1. SMB 3.x versions are strongly recommended because they support encryption in transit (using AES-256-GCM) and deliver better performance than SMB 2.1, which sends data without encryption. Picking the right SMB version affects both security and application compatibility, which is frequently tested in the AZ-104 exam.

SMB एक protocol है जो computers के बीच file sharing के लिए उपयोग होता है। SMB 3.x अधिक secure होता है क्योंकि यह data को encrypt करके भेजता है, इसलिए production environment में इसे अधिक prefer किया जाता है.

Real-Life Example: Think of SMB versions like generations of a courier service — older versions deliver packages without extra security checks, while newer versions add tamper-proof sealed packaging (encryption).

Comparison of SMB Versions

SMB VersionEncryption in TransitRecommended For
SMB 2.1NoLegacy compatibility only
SMB 3.0Yes (AES-128)General cloud + on-prem access
SMB 3.1.1Yes (AES-256-GCM)Latest, most secure, internet-facing access



 

Azure File Share Use Cases

Definition: Azure File Shares are commonly used for lift-and-shift migration of legacy applications that depend on a mapped network drive, centralized storage of shared configuration and diagnostic files, and as a full replacement for on-premises file servers. They are also used to provide shared storage across multiple VMs when a common dataset needs to be accessed simultaneously, and in hybrid scenarios through Azure File Sync where local caching improves performance for branch offices.

Real-Life Example: A company running a legacy accounting application that reads settings from a network drive can move that drive to Azure Files without changing a single line of application code.

Storage Account Requirement

Definition: Every Azure File Share must be created inside a Storage Account, which acts as the top-level management and billing boundary. The storage account decides the region, redundancy, performance tier, and access keys used by the file share. Without a storage account, no file share (or any other storage service) can exist, because the storage account provides the unique namespace under which all storage resources are organized.

Azure File Share बनाने से पहले Storage Account बनाना आवश्यक है, क्योंकि file share उसी के अंदर store होता है। Storage Account file shares के लिए parent container की तरह काम करता है.

Real-Life Example: Just like you need a bank account before you can rent a locker at that bank, you need a Storage Account before you can create a File Share.

💡 Memory Trick

Remember Azure Files with 'S-C-U-S': Shared access, Cloud-hosted, Uses SMB/NFS, Storage-Account-dependent.

Important Exam Points

  • Azure Files supports SMB and NFS protocols — NFS is only supported on Premium file shares (FileStorage account kind).
  • SMB 3.0+ is required for encryption in transit; always recommend it over SMB 2.1 in exam scenarios.
  • A File Share always lives inside a Storage Account — you cannot create one independently.

 

Common Mistakes to Avoid

  • Assuming Azure Files can be mounted without a storage account — it always needs one.
  • Forgetting that older SMB 2.1 clients cannot use encryption in transit, creating a security gap.
  • Confusing Azure Files (SMB/NFS shares) with Blob Storage (HTTP/HTTPS object access) — they serve different protocols.

 

Practice Questions

  • What protocol does Azure Files primarily use for Windows-based access?
  • Name two benefits of using Azure Files instead of an on-premises file server.
  • Which SMB version should be used for the strongest encryption, and why?
  • Can an Azure File Share exist without a Storage Account? Justify your answer.

Short Interview Questions

  • What is Azure Files and how is it different from a traditional file server?
  • Why would you choose SMB 3.1.1 over SMB 2.1 in a production environment?
  • In what real-world scenario would you use Azure File Sync?

5.2 Azure Storage Account

What is an Azure Storage Account?

Definition: An Azure Storage Account is a top-level resource that provides a unique namespace for storing data objects such as blobs, files, queues, tables, and disks. It defines global settings like redundancy, performance tier, and networking rules that apply to all data stored within it. Every object in Azure Storage is accessed via a URL that includes the globally unique storage account name.

Storage Account Azure का मुख्य container है, जिसमें files, blobs, tables, और queues जैसे data को store किया जाता है। यह तय करता है कि data कहाँ store होगा और कितना सुरक्षित रहेगा.

Real-Life Example: Think of a Storage Account like a large warehouse — inside it you have sections for boxes (Blobs), folders (files), record cards (Tables), and message slips (Queues), but the whole building has one address.

Why is a Storage Account Required?

Definition: A Storage Account is required because it is the mandatory administrative and billing boundary for all Azure Storage services — no blob, file share, queue, or table can exist independently of one. It centralizes security configuration such as access keys, Shared Access Signatures (SAS), firewall rules, and encryption settings.

Real-Life Example: Similar to a company registering itself before it can open individual departments — registration (storage account) must exist first.

Types of Azure Storage Services

Definition: Every storage account can host four core services: Blob Storage for unstructured data, Azure Files for SMB/NFS shares, Table Storage for NoSQL key-value data, and Queue Storage for asynchronous messaging. Each is optimized for a specific data pattern, and knowing which service fits which scenario is a key AZ-104 exam skill.

एक Storage Account में चार services होती हैं — Blob, Files, Table, और Queue। हर service अलग प्रकार के data और उसके specific use case के लिए बनाई गई है.

Storage Services at a Glance

ServiceData TypeAccess MethodTypical Use
Blob StorageUnstructured (images, video, docs)HTTP/HTTPS, REST APIMedia, backups, big data
Azure FilesFile sharesSMB / NFSShared drives, lift-and-shift
Table StorageNoSQL key-valueREST APIMetadata, logs, IoT data
Queue StorageMessagesREST API (HTTP/HTTPS)Async messaging between apps



 

Create a Storage Account

Definition: Creating a Storage Account involves choosing the subscription, resource group, unique account name, region, performance tier (Standard or Premium), and redundancy option (LRS, ZRS, GRS, RA-GRS). Advanced settings include enabling hierarchical namespace for Data Lake, requiring secure transfer, and configuring network access rules.

Step-by-Step:

  • Sign in to the Azure Portal and search for 'Storage accounts'.
  • Click '+ Create' and select the Subscription and Resource Group.
  • Enter a globally unique Storage Account name (lowercase letters and numbers only).
  • Select the Region closest to your users or applications.
  • Choose Performance: Standard (HDD-based, cost-effective) or Premium (SSD-based, low latency).
  • Choose Redundancy: LRS, ZRS, GRS, or RA-GRS based on your availability needs.
  • Review advanced settings (secure transfer, hierarchical namespace) if needed.
  • Click 'Review + Create', then 'Create' to deploy the storage account.

Real-Life Example: Similar to registering a new business — you choose a name, location, and plan type before you can start operating.

Azure Storage Management

Definition: Storage Management covers ongoing administration tasks like monitoring usage metrics, configuring access via Azure RBAC or SAS tokens, setting lifecycle policies to automatically move or delete old data, and creating alerts for capacity or performance thresholds. Tools used include the Azure Portal, Azure CLI, PowerShell, and Azure Storage Explorer.

Storage Management का अर्थ है Storage Account की monitoring करना, security settings लागू करना, और storage cost को control करना.

Real-Life Example: Like managing a warehouse where you regularly check stock levels, control who has keys, and move old stock to cheaper long-term storage.

Storage Services (Detailed)

Blob Storage

Definition: Blob Storage is Azure's object storage solution for massive amounts of unstructured data such as text, images, videos, and backups, accessed via REST APIs over HTTP/HTTPS. It supports tiered access, lifecycle policies, versioning, and soft delete for data protection.

Real-Life Example: Comparable to a giant digital photo album that can store any type of file.

Azure Files

Definition: As a storage service, Azure Files provides managed file shares accessible via SMB and NFS, functioning like a traditional network share but hosted in the cloud, with support for concurrent multi-client access and hybrid caching via Azure File Sync.

Real-Life Example: Functions like a shared network drive in an office that every employee's computer can map.

Table Storage

Definition: Table Storage is a NoSQL key-value store for structured, non-relational data with fast, low-cost access. It uses a schema-less design, so each entity (row) can have different properties, making it flexible for evolving data models.

Real-Life Example: Similar to a giant spreadsheet where each row can have slightly different columns.

Queue Storage

Definition: Queue Storage enables asynchronous communication between application components by storing messages that can be retrieved via authenticated HTTP/HTTPS calls. It decouples senders and receivers so they don't need to operate at the same time.

Queue Storage एक waiting line की तरह काम करता है, जहाँ messages तब तक store रहते हैं जब तक कोई application या service उन्हें process नहीं करती.

Real-Life Example: Works like a restaurant order queue — orders are placed in line and the kitchen processes them one by one.

💡 Memory Trick

Remember the 4 services with 'B-F-T-Q': Blob, Files, Table, Queue — 'Big Files Take Queues'.

Important Exam Points

  • Storage account names must be globally unique, 3–24 characters, lowercase letters and numbers only.
  • Premium performance tier uses SSD-backed storage and is recommended for low-latency workloads like VM disks.
  • Redundancy option chosen at account creation affects cost and disaster-recovery capability.

Common Mistakes to Avoid

  • Trying to use uppercase letters or special characters in a storage account name (not allowed).
  • Choosing LRS for a mission-critical application that needs region-level disaster recovery — GRS/RA-GRS should be used instead.
  • Forgetting that changing the redundancy option after creation may require data migration in some cases.
  •  

Practice Questions

  • List the four core services available inside an Azure Storage Account.
  • What naming rules apply to a Storage Account name?
  • Differentiate between Standard and Premium performance tiers.
  • Why can't a Blob Container exist without a Storage Account?

Short Interview Questions

  • Explain the role of a Storage Account in the Azure Storage hierarchy.
  • What factors would you consider when selecting a redundancy option for a storage account?
  • How would you secure access to a storage account in a production environment?

5.3 Azure Blob Storage

What is Blob Storage?

Definition: Azure Blob Storage is a massively scalable object storage service for unstructured data such as documents, media files, log files, and backups. Blobs live inside containers within a storage account and are accessible globally over HTTP/HTTPS using a unique URL. It supports tiered access, lifecycle policies, versioning, and soft delete.

Blob Storage का उपयोग cloud में photos, videos, और documents जैसी files को store करने के लिए किया जाता है। Data को containers के अंदर store किया जाता है.

Real-Life Example: Similar to a massive digital storage room where you can drop any type of file without worrying about space.

Types of Blobs

Definition: Azure Blob Storage supports three blob types, each optimized for a different workload: Block Blobs for discrete large files, Append Blobs for append-only logging, and Page Blobs for random read/write access used by VM disks.

Blob के तीन प्रकार होते हैं: Block Blob सामान्य files के लिए, Append Blob logs के लिए, और Page Blob Virtual Machine disks के लिए उपयोग होता है। प्रत्येक प्रकार एक विशेष कार्य के लिए optimize किया गया है.

Blob Types Comparison

Blob TypeBest ForStructureExample Use
Block BlobLarge discrete filesComposed of blocks, committed togetherImages, videos, documents
Append BlobAppend-only writesNew blocks added only at the endApplication/log files
Page BlobRandom read/write512-byte addressable pagesVM virtual hard disks (VHD)


 

Block Blob

Definition: Block Blobs are the most common blob type, storing text and binary data by breaking large files into blocks that can be uploaded independently and then committed as one blob. This enables efficient parallel and resumable uploads for large files.

Real-Life Example: Comparable to assembling a jigsaw puzzle where pieces (blocks) are uploaded separately and then combined.

Append Blob

Definition: Append Blobs allow data to be added only at the end; existing content cannot be modified. This makes them ideal for scenarios like application logging where new entries are continuously written without altering history.

Real-Life Example: Similar to a visitor log book where new entries are always added at the bottom and old entries are never erased.

Page Blob

Definition: Page Blobs are optimized for frequent random read/write operations, organized into 512-byte addressable pages. They are the underlying format for Azure VM disks (VHDs), where the OS constantly reads and writes to random disk sectors.

Page Blob का उपयोग मुख्य रूप से Virtual Machine की hard disks (VHD files) के लिए किया जाता है। इसमें file के किसी भी random हिस्से को सीधे पढ़ा या update किया जा सकता है.

Real-Life Example: Works like a physical hard drive where the computer jumps to any specific sector to read/write data.

Blob Containers

Definition: A Blob Container is a logical grouping for related blobs, similar to a folder. Every blob must live inside a container, and containers can have access-level settings such as private, blob-level public, or full container public access.

Container एक folder की तरह होता है, जिसमें Azure Blob Storage के blobs (files) store किए जाते हैं.

Real-Life Example: Similar to a labeled folder on your desktop where you organize related documents together.

Blob Storage Use Cases

Definition: Blob Storage is used to serve images/documents to browsers, stream video/audio, store backup and archival data, and provide data for analytics through services like Azure Data Lake and Databricks. Its tiered pricing makes it suitable for both hot and cold data.

Real-Life Example: A media streaming website storing thousands of videos in Blob Storage for global playback.

Access Tiers

Definition: Access Tiers balance storage cost against access cost based on how frequently data is used: Hot, Cool, Cold, and Archive, each offering lower storage costs but higher retrieval costs/latency. Blobs can move between tiers manually or automatically via lifecycle policies.

Access Tiers यह बताते हैं कि data कितनी बार उपयोग होगा। बार-बार उपयोग होने वाला data Hot में, कभी-कभी उपयोग होने वाला data Cool या Cold में, और बहुत कम उपयोग होने वाला data Archive में रखा जाता है.

Access Tiers Comparison

TierAccess FrequencyStorage CostRetrieval TimeMin. Storage Duration
HotFrequentHighestInstantNone
CoolInfrequent (<1/month)LowerInstant30 days
ColdRareLower than CoolInstant~90 days
ArchiveVery rareLowestHours (rehydration)~180 days



 

💡 Memory Trick

Remember blob types with 'BAP': Block (big files), Append (add-only logs), Page (VM disks, random access).

Important Exam Points

  • Archive-tier blobs cannot be read directly — they must be rehydrated first, which can take hours.
  • Page Blobs are always used for VM disks (VHDs), never Block or Append Blobs.
  • Lifecycle management policies can automatically move blobs between tiers based on last-modified date.

Common Mistakes to Avoid

  • Trying to read an Archive-tier blob directly without rehydrating it first.
  • Using Append Blob for random-access data — it only supports append operations.
  • Forgetting that changing tiers has early-deletion penalties if done before the minimum storage duration.

Practice Questions

  • Which blob type would you use to store a virtual machine's disk?
  • What is the main difference between Block Blob and Append Blob?
  • Why can't you instantly read data stored in the Archive tier?
  • Name the four Blob Storage access tiers in order of increasing storage cost.

Short Interview Questions

  • Explain the difference between Block, Append, and Page blobs with real examples.
  • How would you design a cost-optimized storage strategy using access tiers?
  • What is blob rehydration and when would you use it?

5.4 Azure File Share

What is a File Share?

Definition: An Azure File Share is an individual, fully managed file system created within a storage account's Azure Files service, functioning like a shared network folder that multiple users or systems can access at once. Each storage account can host multiple file shares, each with its own quota and billing.

Real-Life Example: Comparable to a shared company drive where employees across departments open, edit, and save files together.

File Share Components

Definition: A File Share consists of the storage account hosting it, the share itself (root of the file system), directories/folders for organization, and individual files. Configurable properties include quota (max size), tier (Transaction Optimized, Hot, Cool, Premium), and protocol (SMB or NFS).

File Share के अंदर directories और files होती हैं, बिल्कुल सामान्य computer folder structure की तरह.

Real-Life Example: Similar to a physical filing cabinet (the share) with labeled drawers (directories) holding paper files (files).

SMB File Sharing

Definition: SMB file sharing lets a file share be mounted directly as a network drive on Windows, Linux, and macOS clients using standard OS tools. Authentication can use storage account keys, Azure AD Domain Services, or on-premises AD DS. SMB 3.0+ connections are encrypted in transit.

Real-Life Example: Works exactly like mapping a network drive letter in Windows File Explorer, except the folder is hosted in Azure.

Azure File Share Use Cases

Definition: File Shares commonly replace on-premises file servers, host shared application configuration files accessed by multiple VMs, store centralized diagnostic/log data, and support lift-and-shift migrations for legacy applications. They also pair with Azure File Sync for hybrid caching.

Real-Life Example: A dev team storing shared build artifacts on a File Share accessible from all their build servers.

💡 Memory Trick

'Share = Storage + Hierarchy + Access' — a File Share always sits inside a Storage Account and has a folder hierarchy accessed via SMB/NFS.

Important Exam Points

  • File Share quota can be increased up to the maximum supported size without downtime.
  • Identity-based authentication (AD DS / Azure AD DS) allows folder-level NTFS permissions on Azure File Shares.

Common Mistakes to Avoid

  • Assuming File Share access always requires storage account keys — identity-based auth is also supported.
  • Not setting an appropriate quota, leading to unexpected billing or space issues.

 

Practice Questions

  • What are the key components that make up a File Share?
  • How can identity-based authentication improve File Share security?
  • Give one real-world use case for Azure File Share.

Short Interview Questions

  • How would you migrate an on-premises file server to Azure File Share?
  • What authentication options are available for SMB access to Azure Files?

5.5 Azure Table Storage

What is Table Storage?

Definition: Azure Table Storage is a NoSQL key-value store for large volumes of structured, non-relational data at low cost. Unlike relational databases, it does not enforce a fixed schema, so each row can have a different set of properties. It is designed for fast lookups using a partition key and row key.

Table Storage एक simple NoSQL database है, जिसमें data बिना fixed structure के store किया जा सकता है। हर row में अलग-अलग properties हो सकती हैं.

Real-Life Example: Similar to a flexible address book where some contacts have just a phone number while others also have email and company name.

Table and Entity

Definition: A Table is a collection of entities; an Entity is like a row in a relational database, made up of properties plus a mandatory PartitionKey and RowKey that together uniquely identify it. The PartitionKey groups related entities for efficient querying, while the RowKey uniquely identifies an entity within its partition.

Table के अंदर entities होती हैं, जो rows की तरह होती हैं। PartitionKey और RowKey मिलकर प्रत्येक entity की unique identity बनाते हैं.

Real-Life Example: Comparable to a library catalog where PartitionKey is the genre section ('Fiction') and RowKey is the book's catalog number within that section.

Use Cases of Table Storage

Definition: Table Storage suits large-scale structured data that doesn't need complex joins or transactions, such as user profiles, IoT device data, application logs, and metadata. It's cost-effective for fast, simple read/write operations at massive scale.

Real-Life Example: An IoT application storing temperature readings from thousands of sensors as simple entities.

💡 Memory Trick

'PK + RK = Unique' — PartitionKey groups data, RowKey makes each row unique within that group.

Important Exam Points

  • Table Storage does not support complex relational joins — design your partition/row keys around your query patterns.
  • Azure Cosmos DB Table API is the premium, globally-distributed alternative to classic Table Storage.

Common Mistakes to Avoid

  • Choosing a PartitionKey with low cardinality, causing uneven load distribution.
  • Expecting SQL-style joins between tables — Table Storage doesn't support them.

 

Practice Questions

  • What two keys uniquely identify an entity in Table Storage?
  • Why is Table Storage described as 'schema-less'?
  • Give one real-world use case for Table Storage.

Short Interview Questions

  • Explain PartitionKey and RowKey with a real example.
  • When would you choose Table Storage over a relational database?

5.6 Azure Queue Storage

What is Queue Storage?

Definition: Azure Queue Storage is a cloud messaging service that stores large numbers of small messages accessible asynchronously via authenticated HTTP/HTTPS calls. It decouples application components, letting producers and consumers operate independently and at different rates, improving reliability and scalability. Each message can be up to 64 KB, and a queue can hold millions of messages.

Queue Storage messages को तब तक store रखता है जब तक कोई दूसरा application उन्हें process नहीं करता। इससे दो systems बिना एक-दूसरे का इंतज़ार किए काम कर सकते हैं.

Real-Life Example: Similar to a ticket counter's token system — customers take a number and wait while staff serve tokens one at a time.

Queue and Message

Definition: A Queue is a named container holding messages; a Message is the individual data unit placed into it, usually containing task instructions or event notifications. Messages stay in the queue until retrieved and deleted by a consumer. Azure guarantees at-least-once delivery, so applications must handle possible duplicate processing.

Queue एक container है जिसमें messages store होते हैं। Message process होने के बाद उसे delete करना आवश्यक है, वरना वह फिर से queue में दिखाई दे सकता है.

Real-Life Example: Like a to-do list sticky-note pad — each note (message) is added, and once done, it's removed.

Use Cases of Queue Storage

Definition: Queue Storage is used to build resilient, decoupled architectures such as triggering background processing, distributing work across multiple workers, and buffering between a front-end web app and backend service to handle traffic spikes gracefully.

Real-Life Example: An e-commerce site placing new orders into a queue so a backend service can process payments without slowing the website.

💡 Memory Trick

'Queue = Decouple + Deliver' — it decouples sender/receiver and guarantees at-least-once delivery.

Important Exam Points

  • Maximum message size in Azure Queue Storage (classic) is 64 KB.
  • Azure Queue Storage provides at-least-once delivery, not exactly-once — design consumers to be idempotent.

Common Mistakes to Avoid

  • Assuming a message is deleted automatically after being read — it must be explicitly deleted by the consumer.
  • Not handling duplicate message processing, which can occur due to at-least-once delivery guarantees.

 

Practice Questions

  • What is the maximum size of a single message in Azure Queue Storage?
  • Why must consumer applications handle duplicate messages?
  • Give a real-world scenario where Queue Storage would be useful.

Short Interview Questions

  • How does Queue Storage help decouple application components?
  • What design consideration is needed due to at-least-once delivery?

5.7 Azure Storage Data Management

File Sync

Definition: Azure File Sync centralizes an organization's file shares in Azure Files while retaining the performance and compatibility of an on-premises Windows Server file server through local caching. An agent installed on the Windows Server synchronizes files between on-premises and the Azure File Share. Cloud tiering keeps infrequently used files only in Azure, represented locally as pointers, saving on-prem storage space.

Azure File Sync on-premises server और Azure File Share के बीच data को synchronized रखता है। पुरानी files अपने आप cloud में चली जाती हैं, जिससे local storage space बचता है.

Real-Life Example: Similar to how cloud photo apps keep recent photos on your phone but store older ones only in the cloud, downloading on demand.

Object Replication

Definition: Object Replication asynchronously copies block blobs between a source and destination storage account (same or different region) based on a replication policy. It's used to reduce latency for geographically distributed users, improve read performance, and maintain a secondary copy for compliance or disaster recovery. It requires blob versioning and change feed enabled on the source account.

Real-Life Example: Comparable to a global retail chain keeping duplicate stock in warehouses across different countries.

Storage Data Replication

Definition: Storage Data Replication defines how many copies of data are kept and where, to protect against hardware failure, datacenter outage, or regional disaster. Options: LRS (3 copies, 1 datacenter), ZRS (spread across availability zones), GRS (replicated to a secondary paired region), RA-GRS (GRS + read access to secondary region).

Data Replication यह तय करता है कि data की कितनी copies store होंगी। LRS data को local region में रखता है, जबकि GRS और RA-GRS दूसरी region में भी copy रखते हैं, जिससे disaster के समय data सुरक्षित रहता है.

Redundancy Options Comparison

OptionCopiesScopeRead Access to Secondary
LRS3Single datacenterNo
ZRS3Multiple availability zones, same regionNo
GRS6 (3+3)Primary + paired secondary regionNo
RA-GRS6 (3+3)Primary + paired secondary regionYes

Access Tiers

Definition: In data management, Access Tiers (Hot, Cool, Cold, Archive) are combined with lifecycle management policies to automatically move blobs between tiers based on age or last access, optimizing cost over the data's lifecycle — for example, moving blobs from Hot to Cool after 30 days of inactivity, and to Archive after 180 days.

Real-Life Example: Similar to an automatic email rule that archives emails older than a year without manual action.

💡 Memory Trick

Remember redundancy order with 'L-Z-G-R': LRS < ZRS < GRS < RA-GRS, increasing protection and cost.

Important Exam Points

  • GRS/RA-GRS replicate to the Azure paired region, which is predefined by Microsoft and cannot be changed.
  • Object Replication requires both blob versioning and change feed to be enabled first.
  • Lifecycle management policies are rule-based (JSON) and run automatically once configured.

Common Mistakes to Avoid

  • Choosing LRS for disaster-recovery-critical workloads (no protection against regional outage).
  • Forgetting to enable blob versioning before configuring Object Replication.
  • Not setting up lifecycle policies, leading to unnecessarily high storage costs over time.

 

Practice Questions

  • What is the main purpose of Azure File Sync?
  • Name the four storage redundancy options in increasing order of protection.
  • What two features must be enabled before configuring Object Replication?
  • How do lifecycle management policies help reduce storage cost?

Short Interview Questions

  • Explain the difference between GRS and RA-GRS.
  • How would you design a disaster recovery strategy using Azure Storage replication options?
  • What is cloud tiering in Azure File Sync?

5.8 Azure Cosmos DB

What is Azure Cosmos DB?

Definition: Azure Cosmos DB is a fully managed, globally distributed NoSQL and relational database service built for low-latency, high-availability access at any scale. It supports multiple APIs — SQL (Core), MongoDB, Cassandra, Gremlin, and Table — letting developers use familiar data models. Cosmos DB replicates data across any number of Azure regions with a few clicks, guaranteeing single-digit millisecond latency.

Azure Cosmos DB एक globally distributed database है, जो high speed और high availability प्रदान करता है। यह multiple database models और APIs को support करता है.

Real-Life Example: Comparable to a global chain of 24/7 stores with synchronized inventory, so you get the same fast service anywhere.

What is a NoSQL Database?

Definition: A NoSQL database is a non-relational database designed for data that doesn't fit neatly into rows and columns, offering flexible schemas and horizontal scalability. Types include document, key-value, column-family, and graph databases. Cosmos DB's Core (SQL) API uses a document-based model storing data as JSON.

NoSQL database पारंपरिक table-row-column structure को follow नहीं करता। यह data को JSON जैसे flexible format में store करता है.

Real-Life Example: Similar to a flexible filing system where each folder can hold a different set of documents, unlike a strict spreadsheet.

Benefits of Azure Cosmos DB

Definition: Cosmos DB offers guaranteed low latency, elastic scalability of throughput and storage independently, five consistency models to balance performance and accuracy, and a 99.999% availability SLA for multi-region deployments. It also auto-indexes all data without requiring schema management, and supports multiple APIs without vendor lock-in.

Real-Life Example: Like a highly efficient global courier service that delivers within seconds and never fails even during disasters.

Azure Cosmos DB Use Cases

Definition: Cosmos DB is used for real-time personalization, IoT/telemetry ingestion at scale, retail/e-commerce catalogs, gaming leaderboards needing instant updates, and globally distributed applications requiring consistent low-latency access worldwide.

Real-Life Example: A global gaming company using Cosmos DB for player profiles so leaderboards update near-instantly worldwide.

Create a Cosmos DB Account

Definition: Creating a Cosmos DB account involves selecting the API (Core SQL, MongoDB, Cassandra, etc.), the subscription, resource group, account name, region, capacity mode (provisioned or serverless), and geo-redundancy options.

Step-by-Step:

  • Sign in to the Azure Portal and search for 'Azure Cosmos DB'.
  • Click '+ Create' and choose the API type (e.g., Core (SQL) for general purpose apps).
  • Select Subscription and Resource Group.
  • Enter a globally unique Account Name.
  • Choose the Region for your primary data location.
  • Select Capacity Mode: Provisioned Throughput or Serverless.
  • Optionally enable geo-redundancy or multi-region writes.
  • Click 'Review + Create', then 'Create' to deploy the account.

Real-Life Example: Similar to opening a new bank branch before creating individual customer accounts inside it.

Database and Container

Definition: In a Cosmos DB account, a Database is a logical namespace managing a set of containers, while a Container is the fundamental unit of scalability where items are stored, indexed, and queried. Containers automatically partition data horizontally based on a specified partition key.

Database एक logical group होता है, जिसमें containers होते हैं। वास्तविक data containers के अंदर store किया जाता है.

Real-Life Example: Comparable to a library building (Database) containing multiple aisles (Containers) holding actual books (items).

Insert and Manage Data

Definition: Data is inserted and managed as JSON items within a container using the Portal's Data Explorer, SDKs (.NET, Java, Python), or REST APIs. Each item is automatically indexed by default, enabling fast queries without manual index setup. Administrators can perform full CRUD operations and run SQL-like queries against a container.

Real-Life Example: Similar to adding new product listings to an online store's catalog, instantly searchable as soon as added.

Partition Keys and Their Importance

Definition: A Partition Key is a property chosen from the data used by Cosmos DB to distribute items across physical partitions, enabling horizontal scalability. Choosing an effective key is critical — a poorly chosen key can cause 'hot partitions' where one partition receives disproportionate traffic, leading to throttling. A good key has high cardinality and distributes reads/writes evenly, such as a customer ID.

Partition Key यह तय करता है कि data को partitions में कैसे बाँटकर store किया जाएगा। गलत key चुनने से hot partitions बन सकते हैं, जिससे performance कम हो जाती है.

Real-Life Example: Similar to organizing a library by author's last name — a good category spreads books evenly, a poor one overloads a few shelves.

💡 Memory Trick

Remember Cosmos DB hierarchy with 'A-D-C-I': Account > Database > Container > Item.

Important Exam Points

  • Cosmos DB offers a 99.999% availability SLA for multi-region read/write configurations.
  • Partition key choice cannot be changed after container creation — choose carefully at design time.
  • Cosmos DB supports five consistency levels: Strong, Bounded Staleness, Session, Consistent Prefix, and Eventual.

Common Mistakes to Avoid

  • Choosing a low-cardinality partition key (e.g., a boolean field), causing hot partitions.
  • Assuming you can change the partition key later — you cannot, without recreating the container.
  • Confusing Cosmos DB's Table API with classic Azure Table Storage — they are different services with different SLAs.

 

Practice Questions

  • What is the hierarchy of resources inside a Cosmos DB account?
  • Why is choosing the right Partition Key so important?
  • Name three APIs supported by Azure Cosmos DB.
  • What happens if a poor Partition Key is chosen?

Short Interview Questions

  • How does Cosmos DB achieve global distribution and low latency?
  • Explain the concept of a 'hot partition' and how to avoid it.
  • What are the five consistency levels in Cosmos DB, and when would you use 'Eventual' consistency?

Practical Exercises

Practical 1: Create a Storage Account

  1. Create an Azure Storage Account.
  2. Explore its storage services.

What we will learn: This practical teaches how to provision a storage account from the Azure Portal and navigate the different storage services (Blob, File, Table, Queue) available within it.

Practical 2: Create and Manage Azure File Share

  1. Create a File Share.
  2. Create a folder and upload a file.
  3. Explore SMB access.

What we will learn: This practical teaches how to set up an Azure File Share, organize it with folders and files, and connect to it using the SMB protocol like a real network drive.

Practical 3: Work with Blob Storage

  1. Create a Container.
  2. Upload a Blob.
  3. Explore different Access Tiers.

What we will learn: This practical teaches how to create a blob container, upload files as blobs, and understand how switching between Hot, Cool, Cold, and Archive tiers affects cost and access.

Practical 4: Create a Cosmos DB Database and Container

  1. Create a Cosmos DB Account.
  2. Create a Database.
  3. Create a Container.
  4. Insert sample data.
  5. Identify the Partition Key.

What we will learn: This practical teaches the end-to-end workflow of provisioning Cosmos DB, structuring it with a database and container, inserting JSON data, and understanding the role of a partition key.