←
Rivet431 posts
Rivet avatar

Rivet

@rivet_dev

Infrastructure for the agentic era. Run and scale agents. Operate their environment. Automate workloads. Deploy what they build.

◷ Joined September 2019▧ 168 Photos and videos
Rivet avatar
Rivet@rivet_dev·Nov 12

Introducing OpenOrange 🍊 Run Cloudflare Workers anywhere (AWS, GCP, Hetzner) 💸 4.8× cheaper compute, 8.7× cheaper storage 🔁 No code changes, live migration, same DX 🚀 No runtime limits, plain Node.js / Bun ⚡ S3-backed storage at SSD speed

0:05
Nathan Flurry 🔩 avatar
⟳ Rivet retweeted
Nathan Flurry 🔩@NathanFlurry·Nov 13

OpenOrange vs celld 34.8x lower S3 costs for agent workloads This is made possible by building OpenOrange on Rivet's storage engine. We've spent years scaling the actor model, and Rivet's storage engine was built for this. celld's architecture balloons costs for: - Agents - Workflows - Background jobs - Session stores ~ Why? First, a primer on running databases on S3. S3 is cheap for storing data. It's about 10x cheaper than AWS EBS replicated across 3 availability zones: $0.023 vs $0.24 per GB per month But it gets expensive once you actually operate on that data. Writing one object every second for a month costs: AWS EBS ~$0 S3 $13 This is because S3 charges per operation, while AWS EBS charges for how much you store and for how long: PUT costs $5 per million LIST costs $5 per million COPY costs $5 per million GET costs $0.40 per million On AWS EBS, these operations are effectively free. The catch is that the number of operations scales with how many objects you have. Every object has to be written with its own PUT, so 1,000 objects cost 1,000 PUTs. Pack the same data into one object and it costs one. ~ So why is celld so expensive? celld stores each Durable Object as its own S3 objects. So the more Durable Objects you create, the more objects you have, and the more you pay. Every new Durable Object costs PUTs to its own objects: claiming it, then saving it when it goes to sleep. That's ~4 PUTs and 1 GET per Durable Object in our benchmark. If you have a fixed number of Durable Objects, this cost is reasonable. But if you're constantly creating new ones, your cost grows with every one. And agents tend to be high churn. Some agents work for days, but most do a quick, discrete task and never get used again. These types of workloads suffer, since they frequently create new Durable Objects: - Agents - Workflows - Background jobs - Multiplayer game rooms - Chat rooms - Per-user sessions - Rate limiting ~ So how does OpenOrange stay so cheap? Rivet's storage engine is built on an LSM tree (log-structured merge tree). It's the same idea behind mature S3-backed databases like ClickHouse, used to keep performance high and cost low. Instead of giving each Durable Object (called Actors on Rivet) its own S3 objects, Rivet's LSM packs many of them into shared S3 objects. Here's how PUTs compare per 1,000 new Durable Objects: - OpenOrange ~90 - celld ~4,000 When you create a Durable Object or write to SQLite on OpenOrange: 1. The write is replicated to SSDs across 3 availability zones (single-digit ms) 2. After about a minute, writes from many Durable Objects are merged into one batch 3. That batch is written to S3 as one object ~ These benchmarks are modeled on real-world agent workloads, measured at 8 to 25,000 concurrent agents. Each agent lives 60 seconds and writes a turn every 10 seconds. We only measured S3 cost, and both ran on identical hardware. ~ OpenOrange is open source today. We've attached the benchmarks below.

Post attachment
Rivet avatar
Rivet@rivet_dev·Nov 12

You pay for just your machines and S3, instead of paying Cloudflare for nuance usage-based billing and complicated enterprise agreements. The same workload on AWS vs Cloudflare: - Durable Object compute: 4.8× cheaper - SQLite storage: 8.7× - KV writes: 28× - Workflow steps: 45×

Post attachment
Rivet avatar
Rivet@rivet_dev·Nov 12

OpenOrange has tools to migrate off Cloudflare with zero downtime: 1. Expose a migration endpoint to stream data out of Cloudflare 2. Point DNS at OpenOrange. Durable Objects copy their data on first request 3. Backfill the rest 4. Shut down Cloudflare No maintenance window.

0:25
Rivet avatar
Rivet@rivet_dev·Nov 12

OpenOrange is focused on bindings that are portable, production-ready and built to scale. Every Cloudflare binding maps to a service you can run anywhere:

Post attachment
Rivet avatar
Rivet@rivet_dev·Nov 12

OpenOrange has the same API as Wrangler, so you can switch over by changing one command: wrangler dev → orange dev Same Wrangler config, same code, same bindings.

Post attachment
Rivet avatar
Rivet@rivet_dev·Nov 11

How it works: forks are copy-on-write. A fork shares the source's SQLite data instead of copying it, and stores only what it writes afterwards. Writes to the fork never reach the source, and the source's writes never reach the fork. Docs: rivet.dev/actors/docs/forkin…

Post attachment
Rivet avatar
Rivet@rivet_dev·Nov 11

Fork any Actor with one call. It returns a handle to the new Actor once its copy is ready. onFork runs once on the fork's first start, so you can cancel copied schedules or set up the fork.

Post attachment
Rivet avatar
Rivet@rivet_dev·Nov 11

Forks work for agents and everything else: Agents → /btw side questions & /fork branches → Forking subagents & agent swarms Beyond agents → Fork agentOS file systems → Clone user documents