Sikau

Microsoft Azure · Day 4 · about 40 min

Blob storage and redundancy

Access tiers, LRS to RA-GZRS, and the cheapest tier.

Ten years of photos

The shop's website shows today's menu photos thousands of times a day. It also keeps every receipt for seven years for the tax office — files nobody reads unless there's an audit. Paying the same price for both would be silly, and losing either would be worse.

Azure Storage lets you choose two things separately: how many copies, where (redundancy) and how often you'll read (the access tier). Today you'll learn both and write the calculator that picks the cheapest tier.

Storage accounts and blobs

A storage account (general-purpose v2 for nearly everything) has a globally unique name of 3–24 lowercase letters and digits, and gives you four services: Blob storage for unstructured files in containers, Files for SMB/NFS file shares, Queues for simple messages and Tables for key-value data. VM disks are managed disks, a separate resource.

  • Hot: frequently read. Highest storage price, cheapest reads.
  • Cool: infrequent reads, kept at least 30 days.
  • Cold: rarely read, kept at least 90 days.
  • Archive: offline, kept at least 180 days. Cheapest to store, but you must rehydrate a blob to hot or cool (taking hours) before reading it.
  • Delete or move a blob before its minimum and you pay an early-deletion charge for the remaining days.
  • Lifecycle management rules can move blobs down the tiers automatically as they age.

Older books list three tiers. The cold tier arrived in 2023, between cool and archive.

The rest of this lesson

  • How many copies, where?explain
  • Region down, GRSpredict
  • Which option survives?match
  • The early-deletion chargefill
  • Redundancy and the cheapest tierwrite code
  • Badge quizquiz
  • What you learnedrecap

Continue this lesson free — run real code in your browser

Continue with Google

See all 10 lessons of Microsoft Azure