Skip to content
Pebellslearn by building

The course

Cloudflare

Learn how Cloudflare runs your code close to every user, and how to pick the right storage for each job. You will build one link shortener step by step, from a first Worker to durable counters and background queues.

Ready to learn

Your path through the ideas

Inside the course

6 modules · 22 lessons
CLI tools & setup · Start here

Install your tools, choose your setup and verify a local run.

02Workers and Workers KV5 lessons

How the Workers runtime runs your code in isolates at the edge, how a Worker turns a request into a response, what happens before and after it replies, how bindings connect it to everything else, and how to use Workers KV for fast global reads.

  1. 01The Workers Runtime — Code at the Edge12 min
  2. 02Request In, Response Out12 min
  3. 03The Workers Lifecycle — Respond First, Finish Later12 min
  4. 04Bindings — How a Worker Reaches Everything Else12 min
  5. 05Workers KV — Fast Reads, Patient Writes15 min
03R2 Storage and the Developer Toolchain5 lessons

Set up a real workflow with Wrangler and Miniflare, organise routes with Hono, then store and serve files in R2 — from small uploads to multi-gigabyte videos — and let lifecycle rules keep the bucket tidy.

  1. 01Wrangler and Miniflare — Build Locally, Ship Globally12 min
  2. 02Routing with Hono — Taming the if-Chain12 min
  3. 03R2 — Buckets of Objects15 min
  4. 04Large Files — Stream, Split or Sign15 min
  5. 05Bucket Lifecycle — Let the Bucket Tidy Itself12 min
04D1 — Serverless SQL4 lessons

Query D1 safely with prepared statements, change its schema through numbered migrations, keep queries fast with indexes and batches, and add type safety with Drizzle or Prisma.

  1. 01D1 — A SQL Database Your Worker Can Call12 min
  2. 02Schema and Migrations — Change the Database in Numbered Steps12 min
  3. 03Query Optimization — Read Fewer Rows, Make Fewer Trips15 min
  4. 04Drizzle and Prisma — Typed Queries on Top of D112 min
05Durable Objects4 lessons

Give each piece of shared state a single named object, use it to coordinate many clients, persist its data in private storage, and keep multi-step changes safe with transactions.

  1. 01Durable Objects — One Name, One Place, One Thread15 min
  2. 02Coordination — A Meeting Point for Many Clients15 min
  3. 03Persistence — Memory Is a Cache, Storage Is the Truth12 min
  4. 04Transactional Operations — All of It or None of It15 min
06Queues4 lessons

Send messages from any Worker and consume them in batches, turn slow extras into background jobs, pace calls to rate-limited services, and catch messages that keep failing in a dead letter queue.

  1. 01Queues — Hand Off Now, Process Later15 min
  2. 02Background Jobs — Slow Work Off the Request Path12 min
  3. 03Rate Limiting — Let the Queue Set the Pace15 min
  4. 04Dead Letter Queues — Where Failed Messages Go to Be Studied12 min
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.