Storage bắt đầu từ access pattern
Một image upload không cần file locking như shared folder; một job queue không nên dùng blob listing làm message broker; metadata key-value không tự nhiên trở thành relational table.
| Need | Service | Câu hỏi cần chốt |
|---|---|---|
| Object/unstructured | Blob | tier, lifecycle, versioning, public access, redundancy |
| Shared file semantics | Azure Files | SMB/NFS, mount, identity, performance, snapshots |
| Producer/consumer | Queue Storage | retry, visibility, poison message, idempotency |
| Key-value | Table Storage | PartitionKey/RowKey, query, hot partition, schema flexibility |
Access tier và lifecycle
Hot/Cool/Archive là trade-off access cost, storage cost, retrieval latency/fee và minimum retention. Lifecycle rule phải gắn với business retention; archive không phù hợp dữ liệu cần đọc ngay. Redundancy tăng durability/availability nhưng có cost và replication behavior.
Bài tập
Thiết kế storage cho photo service. Ghi source of truth, access frequency, retention, delete/recovery, encryption/access boundary, redundancy và egress. Thiết kế queue flow có duplicate message và worker crash.
Checkpoint
Bạn đạt bài khi chọn service bằng data semantics và chứng minh tier/redundancy không phá requirement hoặc budget.