PartyKit Review (2026): Real-Time Apps on Cloudflare Workers
PartyKit is one of those tools that makes you wonder why it didn't exist sooner. It gives you programmable, stateful WebSocket servers running on Cloudflare Workers — and it makes building real-time features feel like writing a regular Node.js server.
What Is PartyKit?
PartyKit lets you create "parties" — stateful server instances that handle WebSocket connections. Each party runs in a Cloudflare Durable Object, meaning it has persistent state, runs at the edge, and scales automatically.
Think of it as: serverless functions, but they stay alive, hold state, and talk to connected clients in real-time.
Key Features
Stateful Servers at the Edge
Each party is a JavaScript class with onConnect, onMessage, and onClose handlers. The server persists between messages — unlike stateless serverless functions.
Cloudflare's Global Network
Your parties run on Cloudflare's edge network, meaning users connect to the nearest data center. Latency is consistently low worldwide.
Built-in Yjs Support
Need collaborative editing? PartyKit includes a Yjs provider out of the box. Plug it into Tiptap, Lexical, or any Yjs-compatible editor.
Room-Based Architecture
Every URL path creates a separate party (room). Users connecting to the same path share state. Perfect for document editing, game lobbies, or chat rooms.
Hibernation API
Parties can hibernate when no clients are connected, reducing costs. They wake up instantly when someone reconnects.
Developer Experience
Getting started is remarkably simple:
npm create partykit@latest
This scaffolds a project with a server and client. Deploy with npx partykit deploy and you're live.
The local development experience is solid — npx partykit dev runs a local server with hot reloading. The feedback loop is fast.
What Can You Build?
- Collaborative editors: Yjs integration makes this almost plug-and-play
- Multiplayer games: Turn-based or real-time, with server-authoritative state
- Live dashboards: Push data updates to all connected clients
- Chat rooms: With typing indicators, read receipts, and presence
- Voting/polling: Real-time results as people vote
- Cursor sharing: Figma-style presence indicators
Pricing
PartyKit runs on Cloudflare Workers, so you pay Cloudflare's pricing:
- Free tier: 100K requests/day, 10ms CPU time per request
- Workers Paid: $5/mo for 10M requests, additional at $0.50/M
- Durable Objects: $0.15/M requests + $0.20/GB storage
For most real-time apps, total cost is $5-20/mo — a fraction of managed alternatives.
Limitations
- Cloudflare only: No option to run on AWS, GCP, or your own servers
- Durable Object limits: 128KB alarm data, 256KB WebSocket message size
- No built-in auth: You handle authentication yourself
- Limited persistence: Durable Object storage isn't a database — complex queries aren't possible
- TypeScript/JavaScript only: No support for other languages
PartyKit vs Alternatives
vs Liveblocks: PartyKit gives you more control but less out of the box. You write server logic; Liveblocks gives you pre-built components.
vs Socket.io: PartyKit is serverless and stateful. Socket.io requires managing your own WebSocket server.
vs Ably/Pusher: Those are pub/sub services. PartyKit lets you run custom server-side logic, not just broadcast messages.
Who Should Use PartyKit?
Great fit for:
- Developers who want real-time features without managing WebSocket infrastructure
- Projects that need custom server-side logic for their real-time features
- Apps where low latency matters (global edge deployment)
- Budget-conscious teams (Cloudflare pricing is very competitive)
Not ideal for:
- Teams that need pre-built collaboration UI components (use Liveblocks)
- Complex data persistence needs (use a proper database)
- Non-JavaScript backends
The Verdict
PartyKit is the best option for developers who want the control of a custom WebSocket server without the infrastructure headache. Its position on Cloudflare's edge network delivers performance that self-hosted solutions struggle to match, at a fraction of the cost.
Rating: 4.5/5 — Excellent developer experience, great pricing, limited only by Cloudflare's platform constraints.
FAQ
Is PartyKit production-ready?
Yes. It runs on Cloudflare's production infrastructure and is used by companies building real-time products.
Can I use PartyKit with Next.js?
Yes. Use the PartyKit client SDK in your React components and connect to your PartyKit server. They deploy separately.
Does PartyKit support WebRTC?
PartyKit handles WebSocket connections. For WebRTC, you'd use PartyKit as a signaling server and handle peer connections client-side.
How does PartyKit handle scaling?
Each party (room) scales independently on Cloudflare. You can have millions of rooms, each handling up to ~32K concurrent connections.