![I built Fluxychat – realtime chat on Cloudflare Workers, Durable Objects and D1 [open beta]](https://external-preview.redd.it/qeifkwwr4C5QSg58B_96VUqdBQ2DqQxNVOT5ptzpTrU.png?width=1080&crop=smart&auto=webp&s=1bbc6ab048a617b0fb21e9550f1a864e0b91044f)
I built Fluxychat – realtime chat on Cloudflare Workers, Durable Objects and D1 [open beta]
Spent the last couple months building FluxyChat on:
- Workers
- Durable Objects
- D1
The core pattern is:
>one Durable Object per room
The Room DO handles:
- WebSocket sessions
- ordering
- realtime broadcast
- coordination
D1 stores:
- messages
- quotas
- metadata
A few things that worked well:
- single-writer room ownership
- simpler fan-out logic
- idle room hibernation
Things that became harder later:
- reconnect storms
- cross-room analytics
- replay consistency
- D1 write amplification
Implementation is here:
https://github.com/AlessandroFare/fluxychat/tree/main/apps/worker/src/durable-objects
Questions for people running DOs in production:
- How are you handling reconnect storms after hibernation?
- Are you batching D1 writes aggressively?
- Have you kept the “one DO = one room” model long term?