Hosting Providers
Cloudflare Workers
Deploy Rivet Actors to Cloudflare Workers with Durable Objects for global edge computing with persistent state.
Feature Support
Feature | Supported |
---|---|
Horizontal scaling | Yes |
WebSockets | Yes |
SSE | Yes |
Edge | Yes |
Scheduling | Yes |
Setup
Install packages
Install the Cloudflare Workers driver:
Command Line
Configure the driver
Update your server code to support Cloudflare Workers:
server.ts
Configure Wrangler
Update your wrangler.json
configuration to support ACTOR_DO
and ACTOR_KV
bindings:
wrangler.json
Configuration Requirements:
ACTOR_DO
- Durable Object binding for actor persistenceACTOR_KV
- KV namespace binding for metadata storagenodejs_compat
- Required compatibility flag- Migration with
ActorHandler
class definition
Deploy
Deploy your application to Cloudflare Workers:
Command Line
Your actors will now run on Cloudflare's global edge network with persistent state backed by Durable Objects.