Microsoft Certified: Azure Developer Associate (AZ-204)Develop for Azure storageMedium
A developer is implementing a new feature for a web application that allows users to upload large video files. These files need to be stored securely and made available for streaming after processing. During the upload process, the application must ensure data integrity and prevent corruption. Which Azure Blob Storage upload method is most suitable for handling large files while ensuring data integrity?
- APut Blob
- BAppend Blob
- CPage Blob
- DPut Block List
Show answer & explanationAnswer & explanation
Correct answer: D. Put Block List
Put Block List allows large files to be uploaded in smaller, manageable blocks. These blocks are then committed as a single blob, providing atomic writes and ensuring data integrity even if parts of the upload fail.
Why the other options are wrong
- A. Put Blob is suitable for single-shot uploads of small files (up to 256 MB in REST API, 5 GB in SDKs), not large video files.
- B. Append Blob is optimized for append operations, like logging, not for overwriting or creating large files in a single logical operation.
- C. Page Blob is optimized for random read/write operations and is used for VHDs, not for general-purpose large file uploads.
Azure Blob Storage Block Blobs (Put Block List)
Block blobs are optimized for uploading large amounts of data efficiently. They allow files to be broken into smaller blocks, uploaded independently, and then committed as a single, complete blob, ensuring atomicity and integrity.
- Ideal for large files (GBs to TBs).
- Data uploaded in blocks (up to 50,000 blocks per blob).
- Blocks are committed using `Put Block List` operation.
- Ensures data integrity and allows for parallel uploads/retries.
Memory trick: Blocks for big stuff, Pages for VMs, Appends for logs, that's the blob story.