Lesson 9 of 16
11. Object / Blob Storage

11.8 How should files be served to users?

3 min read+10 XP

At the cloakroom: If guests from every city come to one cloakroom to collect souvenirs, the queue stretches out the door. Better: send copies of the popular souvenirs to small counters near each city.

In the system: You can serve objects straight from the bucket, but for anything popular, put a CDN (Chapter 26) in front:

  • The CDN keeps copies at edge locations near users, so covers load fast in Mumbai and in Berlin.
  • Your bucket serves each object once per edge instead of once per user, which cuts egress (data-out) costs, often the biggest line on a storage bill.

For the bookstore, assume 50 million cover views a day at about 100 KB each: about 5 TB a day leaving storage, about 0.46 Gbps on average, more at peak. A CDN absorbs nearly all of it.

Two practical rules:

  • Public, popular, rarely changing (covers): CDN with long cache times and versioned keys, so updating a cover is a new key, never a stale cache.
  • Private (paid PDFs): presigned URLs with short expiry, or a CDN that supports signed URLs or cookies, so only buyers can download.

Memory code: "Popular coats go to counters near the guests."