0
0
Azurecloud~5 mins

Storage tiers (Hot, Cool, Archive) in Azure - Time & Space Complexity

Choose your learning style9 modes available
Time Complexity: Storage tiers (Hot, Cool, Archive)
O(n)
Understanding Time Complexity

We want to understand how the time to access or move data changes when using different storage tiers in Azure.

Specifically, how does the number of operations or delays grow when working with Hot, Cool, or Archive storage?

Scenario Under Consideration

Analyze the time complexity of accessing blobs stored in different tiers.


// Access blobs from different tiers
var hotBlob = container.GetBlobClient("hotBlob");
var coolBlob = container.GetBlobClient("coolBlob");
var archiveBlob = container.GetBlobClient("archiveBlob");

// Read data
var hotData = await hotBlob.DownloadAsync();
var coolData = await coolBlob.DownloadAsync();

// Rehydrate archive blob before reading
await archiveBlob.SetAccessTierAsync(AccessTier.Hot);
// Wait for rehydration to complete before downloading
var archiveData = await archiveBlob.DownloadAsync();
    

This sequence reads data from blobs in Hot, Cool, and Archive tiers, including rehydration for Archive.

Identify Repeating Operations

Identify the API calls, resource provisioning, data transfers that repeat.

  • Primary operation: Downloading blob data from storage tiers.
  • How many times: Once per blob tier (Hot, Cool, Archive).
  • Additional operation: Archive blob requires a rehydration API call before download.
How Execution Grows With Input

As the number of blobs increases, the number of download and rehydration calls grows linearly.

Input Size (n blobs)Approx. API Calls/Operations
10~10 downloads + rehydrations for archive blobs
100~100 downloads + rehydrations for archive blobs
1000~1000 downloads + rehydrations for archive blobs

Pattern observation: The number of operations grows directly with the number of blobs accessed.

Final Time Complexity

Time Complexity: O(n)

This means the time to access data grows in direct proportion to the number of blobs you work with.

Common Mistake

[X] Wrong: "Accessing archive blobs is as fast as hot or cool blobs."

[OK] Correct: Archive blobs need extra steps like rehydration, which adds time and API calls before data can be read.

Interview Connect

Understanding how storage tier operations scale helps you design efficient cloud solutions and explain trade-offs clearly in real projects.

Self-Check

"What if we batch multiple blob downloads in parallel? How would the time complexity change?"