WHITEBOARD / FILE 12
data flowrestore pathattacker / B2 nodes
12. Whiteboard: B2 as CDN origin
Origin egress is the bill nobody budgets. Remove it.
Whiteboard outcome
Users → CDN edge → B2 origin, with “$0” written on the origin-to-edge arrow, signed URLs for private content, and the cache-miss math in the corner.
Draw it in 7 steps
- Right side: world map scribble with users. “Users / players / viewers”.
- Middle: cloud “CDN edge: Cloudflare / Fastly / bunny.net / CacheFly”. Arrow to users.
- Left: “Backblaze B2 bucket (origin)”. Arrow B2 → CDN labeled “$0 egress, Bandwidth Alliance / partner”.
- Under CDN: “Worker / Compute@Edge: auth, rewrite, image resize”. Say: “Private buckets work too: the edge signs requests to B2 so the bucket stays private.” (Backblaze has guides for private and public content through Cloudflare and for Fastly Compute.)
- Arrow from app servers → B2: “uploads via presigned PUT URLs”. Say: “Users upload straight to B2. Your servers never touch the bytes.”
- Event Notifications box: B2 → webhook → “Worker: purge cache / generate thumbnails”.
- Corner math:
origin_egress = total_delivered × (1 − cache_hit_ratio). Write their numbers. Then: “With partner CDN, origin egress cost = $0 regardless.”
flowchart LR APP[App servers] -- presigned PUT URL --> U1[Uploader] U1 -- direct upload --> B2[(B2 bucket: origin)] B2 -- $0 egress: partner --> CDN[CDN edge<br/>Cloudflare / Fastly / bunny.net] CDN --> USERS[Users worldwide] WK[Edge worker: auth / sign / resize] --- CDN B2 -- event notification --> HOOK[Webhook: purge / thumbnails]
Facts
- Backblaze is a founding member of the Bandwidth Alliance (with Cloudflare, DigitalOcean and others). Downloads from B2 to Cloudflare: zero transfer cost (docs).
- Partner free egress list on the pricing page: Fastly, Cloudflare, bunny.net, CacheFly, CoreWeave, Equinix Metal, Vultr, phoenixNAP.
- Backblaze is also a member of the CDN Alliance (nonprofit industry association).
- No static website configuration in the S3 API. Use the CDN for index documents and pretty URLs.
Worked example
SaaS delivering 200 TB/month from a 50 TB library at 90 percent cache hit:
- Origin pulls = 200 × 0.10 = 20 TB.
- On S3 origin to a non-AWS CDN: 20 TB egress ≈ $1,742 (10,000 GB × $0.09 + 9,900 GB × $0.085) using AWS tiers (first 100 GB free, $0.09 next 10 TB, $0.085 next 40 TB) plus storage 50,000 GB × $0.023 = $1,150. Total ≈ $2,892/month. (Using CloudFront instead changes the math: S3 to CloudFront transfer is free, but CloudFront delivery is billed.)
- On B2 behind Cloudflare: storage 50 × $6.95 = $347.50; origin egress $0. Total ≈ $347.50/month.
Landmines
- Cloudflare’s own terms govern caching large video on certain plans. Do not promise CDN pricing; B2 only controls the origin side.
- If the customer is on CloudFront, the comparison is CloudFront delivery vs the new CDN’s delivery, not just origin egress.