Skip to content

danielcompton/cf-tail-consumer-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multiplayer-js

Minimal Cloudflare Workers Durable Object WebSocket reproduction case for debugging a performance regression between Wrangler 4.31.0 and 4.32.0. From bisecting between these two tags, it looks like this was introduced in d3040550.

cf.mov

Fixing it

If you remove tail_consumers with the nonexistent missing-consumer-xyz from the wrangler.toml, the issue disappears.

What it does

  • Durable Object accepts WebSocket connections
  • Broadcasts JSON messages to all connected clients
  • Debug page at / shows cursor positions from all connected browsers

Setup

npm install

Running

# Run with wrangler 4.32.0 (bad)
npm run dev-bad

# Run with wrangler 4.31.0 (good)
npm run dev-good

Then open http://localhost:8787 in multiple browser windows and move your cursor.

Files

  • src/index.js - Worker and Durable Object code
  • wrangler.toml - Cloudflare Workers configuration

About

Reproducing a Cloudflare issue with wrangler 4.32.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors