11. Object / Blob Storage
1
The picture to keep in your head2
11.1 What's the difference between block, file and object storage?3
11.2 Why not just store files in the database?4
11.3 What are buckets, keys and metadata?5
11.4 How do uploads work with presigned URLs?6
11.5 How do you upload very large files reliably?7
11.6 How does object storage avoid losing files?8
11.7 What are storage classes and lifecycle rules?9
11.8 How should files be served to users?10
11.9 What happens after a file is uploaded?11
Memory card and where the analogy breaks12
Practice: five levels13
Interview questions14
Solutions15
Sources16
Code lab11. Object / Blob Storage
Memory card and where the analogy breaks
3 min read+10 XP
The memory card (tear this page out)
| # | Question | Memory code |
|---|---|---|
| 11.1 | Block, file, object? | Locker, cupboard, cloakroom |
| 11.2 | Why not in the database? | The database keeps the token, not the coat |
| 11.3 | Buckets, keys, metadata? | Bucket is the cloakroom, key is the token, metadata is the tag |
| 11.4 | Presigned URLs? | A signed note for one coat, one hook, ten minutes |
| 11.5 | Multipart upload? | Many small boxes, any order; drop one, carry one again |
| 11.6 | Durability? | Copies cost three times; pieces cost far less. Neither saves you from your own delete. |
| 11.7 | Storage classes, lifecycle? | By the door, back room, basement, give away |
| 11.8 | Serving files? | Popular coats go to counters near the guests |
| 11.9 | Processing pipelines? | Take the coat now, brush it later |
The whole chapter in one line: Hand the coat to the cloakroom, keep the token in your database, give out signed notes, and let the back room do the heavy work.
Where the analogy breaks
- A cloakroom has one copy of your coat. Object storage keeps several copies or pieces across buildings, which is why losing a file to hardware failure is so rare.
- A token only fetches the coat. A key can also be listed by prefix, and its metadata can be read without fetching the object.
- Coats aren't copied for strangers. Objects are copied all over the world by CDNs, which is exactly what makes them fast to serve.
Quick check
Five questions on this chapter. Pick an answer, then check it.
quiz