Uploaded April 2026 | Updated September 2026, 4 days ago
Durable Objects can be tricky to wrap your head around, but they don't have to be. In this video, we finally make Durable Objects click by building a Slack-style real-time chat application from scratch.
Instead of just talking about theory, we dive straight into the code. We cover how Cloudflare's Durable Objects differ from standard serverless workers, how to set up persistent SQLite state, and how to seamlessly add real-time WebSocket broadcasting—all in under 70 lines of code.
Create an account on Cloudflare today for free: dash.cloudflare.com/sign-up
Tools mentioned:
developers.cloudflare.com
developers.cloudflare.com/workers
workers.cloudflare.com/product/durable-objects
Chapters:
00:00 - Introduction to Durable Objects
00:15 - The Chat App Demo
00:51 - Where Does the State Live? (Routing)
01:38 - The Durable Object Paradigm (1 ID = 1 Object)
02:13 - Setup & wrangler.json Migrations
02:38 - Writing the Worker Code
03:06 - Writing the Durable Object Code (SQLite)
04:05 - The Problem: Adding Real-Time Updates
04:51 - Updating the Worker for WebSockets
05:15 - The WebSockets Hibernation API
05:54 - Broadcasting Messages to Clients
06:44 - Real-Time Chat Demo
07:05 - How to Scale Durable Objects
07:53 - Conclusion & When to Use Them
Repository: github.com/jillesme/finally-durable-objects-click
#Cloudflare #DurableObjects #Serverless #WebSockets #CloudflareWorkers #WebDevelopment #Backend #RealTime #JavaScript #TypeScript
Durable Objects can be tricky to wrap your head around, but they don't have to be. In this video, we finally make Durable Objects click by building a Slack-style real-time chat application from scratch.
Instead of just talking about theory, we dive straight into the code. We cover how Cloudflare's Durable Objects differ from standard serverless workers, how to set up persistent SQLite state, and how to seamlessly add real-time WebSocket broadcasting—all in under 70 lines of code.
Create an account on Cloudflare today for free: dash.cloudflare.com/sign-up
Tools mentioned:
developers.cloudflare.com
developers.cloudflare.com/workers
workers.cloudflare.com/product/durable-objects
Chapters:
00:00 - Introduction to Durable Objects
00:15 - The Chat App Demo
00:51 - Where Does the State Live? (Routing)
01:38 - The Durable Object Paradigm (1 ID = 1 Object)
02:13 - Setup & wrangler.json Migrations
02:38 - Writing the Worker Code
03:06 - Writing the Durable Object Code (SQLite)
04:05 - The Problem: Adding Real-Time Updates
04:51 - Updating the Worker for WebSockets
05:15 - The WebSockets Hibernation API
05:54 - Broadcasting Messages to Clients
06:44 - Real-Time Chat Demo
07:05 - How to Scale Durable Objects
07:53 - Conclusion & When to Use Them
Repository: github.com/jillesme/finally-durable-objects-click
#Cloudflare #DurableObjects #Serverless #WebSockets #CloudflareWorkers #WebDevelopment #Backend #RealTime #JavaScript #TypeScript










