Skip to main content

☁️ Azure Storage Short Notes

🟢 What is Azure Storage?

  • A cloud-based storage service for storing different types of data:
    • Unstructured (images, videos, docs).
    • Semi-structured (JSON, logs).
    • Structured (tables).
  • Highly available, durable (replicated), and scalable.

👉 Think of it as different storage buckets under one umbrella.


🟢 Core Azure Storage Services

  1. Blob Storage → store unstructured data (images, docs, backups, logs).

    • Access tiers: Hot, Cool, Archive (cost vs. access trade-off).
    • Supports large file uploads (up to TBs).
    • Use cases: CDN, backups, static website hosting.
  2. Table Storage → NoSQL key-value store.

    • Schemaless → good for semi-structured data.
    • Use cases: metadata, logs, user profile storage.
  3. Queue Storage → message queuing for async communication.

    • Simple producer-consumer pattern.
    • Use cases: background jobs, task scheduling.
    • Max message size: 64 KB.
  4. File Storage (Azure Files) → fully managed SMB file shares in the cloud.

    • Mountable by Windows, Linux, macOS.
    • Use cases: legacy app migration, shared file systems.

🟢 Redundancy Options (Replication)

  • LRS (Locally Redundant Storage) → 3 copies within 1 datacenter.
  • ZRS (Zone Redundant Storage) → across 3 availability zones.
  • GRS (Geo-Redundant Storage) → across 2 regions, read-access optional (RA-GRS).

👉 Interview Tip: If asked “How does Azure ensure durability?” → Answer: by replication (LRS/ZRS/GRS).


🟢 Security

  • Shared Access Signatures (SAS) → grant temporary, limited access to storage.
  • Managed Identity + RBAC → modern, secure access.
  • Encryption → data is encrypted at rest and in transit (TLS).
  • Private Endpoints → restrict access to VNET.

🟢 Example: Upload to Blob in .NET

using Azure.Storage.Blobs;
using System;
using System.IO;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        string connStr = "<StorageAccountConnectionString>";
        string containerName = "mycontainer";

        // Create a client
        BlobContainerClient container = new BlobContainerClient(connStr, containerName);
        await container.CreateIfNotExistsAsync();

        // Upload file
        BlobClient blob = container.GetBlobClient("sample.txt");
        using FileStream fileStream = File.OpenRead("sample.txt");
        await blob.UploadAsync(fileStream, overwrite: true);

        Console.WriteLine("✅ File uploaded!");
    }
}

🟢 Monitoring

  • Azure Monitor + Storage Metrics → track capacity, transactions, latency.
  • Diagnostic logs → audit operations on blobs/queues/files.

🟢 Common Interview Questions

  1. What are the different types of Azure Storage?
  2. Difference between Blob Storage access tiers (Hot, Cool, Archive)?
  3. When to use Queue Storage vs. Service Bus?
  4. How do you secure access to Blob Storage?
  5. What is SAS? How is it different from Managed Identity?
  6. How does Azure ensure durability of storage?
  7. Difference between Table Storage and Cosmos DB?
  8. How do you host a static website in Blob Storage?

🟢 Pros & Cons

Pros

  • Highly scalable & durable.
  • Multiple redundancy & tiering options.
  • Easy integration with Azure services.

Cons

  • Latency if accessed across regions.
  • Costs can grow with frequent access.
  • Queue Storage is basic (no topics, sessions → use Service Bus instead).

✅ Quick Recap

  • Blob → unstructured data (Hot/Cool/Archive).
  • Table → NoSQL key-value store.
  • Queue → simple messaging.
  • Files → SMB shares.
  • Secure with SAS + Managed Identity + RBAC.
  • Replication options → LRS, ZRS, GRS.


Comments

Popular posts from this blog

🏗️ Deep Dive: Understanding Every Concept in Microsoft Entra API Onboarding for .NET Developers

When working with Microsoft Entra (formerly Azure Active Directory), you’ll hear terms like App Registration, Tenant, Client ID, Audience, Scopes, Roles, Tokens, OBO flow , and more. If you’re new, it can feel overwhelming. This guide breaks down every key term and concept , with definitions, examples, and how they connect when you onboard and consume a new API. 🔹 1. Tenant Definition : A tenant in Entra ID is your organization’s dedicated, isolated instance of Microsoft Entra. Think of it like : Your company’s identity directory. Example : contoso.onmicrosoft.com is a tenant for Contoso Ltd. 🔹 2. App Registration Definition : The process of registering an application in Entra to give it an identity and permission to use Microsoft identity platform. Why needed : Without registration, Entra doesn’t know about your app. What it creates : Application (Client) ID – unique identifier for your app Directory (Tenant) ID – your organization’s ID Types of apps : Web ...

🗑️ Garbage Collection & Resource Management in .NET (C#) — Beginner Friendly Guide

When you start working with .NET and C#, one of the biggest advantages is that you don’t need to manually manage memory like in C or C++. The Garbage Collector (GC) does most of the work for you. But here’s the catch — not everything is managed automatically. Some resources like files, database connections, sockets, and native memory still need special handling. This blog will help you understand: ✔ How the GC works ✔ What are managed vs unmanaged resources ✔ The difference between Dispose , Finalize , and using ✔ The Dispose pattern with examples ✔ Best practices every C# developer should know 1) How Garbage Collection Works in .NET Managed resources → Normal .NET objects (string, List, etc.). GC frees them automatically. Unmanaged resources → External resources like file handles, database connections, sockets, native memory. GC cannot clean them up — you must do it. 👉 GC uses a Generational Model for performance: Gen 0 : Short-lived objects (local variables, t...

☁️ Azure Key vault Short Notes

🟢 What is Azure Key Vault? A cloud service for securely storing and accessing secrets, keys, and certificates . Removes the need to keep secrets (like connection strings, passwords, API keys) inside code or config files. Provides centralized secret management, encryption, and access control . 👉 Think of it like a secure password manager but for your applications. 🟢 Key Features Secrets → store text values (e.g., DB connection string, API key). Keys → store cryptographic keys (RSA, EC) for encryption, signing. Certificates → store/manage SSL/TLS certificates. Access Control → Access Policies (older model). Azure RBAC (modern, preferred). Integration → works with App Service, Functions, AKS, VMs, SQL DB, etc. Logging → audit who accessed secrets via Azure Monitor / Diagnostic Logs. 🟢 Why Use Key Vault? Security → secrets are encrypted with HSM (Hardware Security Modules). Compliance → meet industry standards (PCI-DSS, ISO, GDPR). Automation → aut...