logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·01.11.26
← Back to news

Why we're moving off Cloudflare Durable Objects

Original article
usewire.io|37 points|8 comments|by jitpal|Jul 9, 2026

Transitioning Wire Away from Cloudflare Durable Objects

Wire provides context containers designed for AI agents. These act as isolated repositories for processed intelligence—including embeddings, provenance graphs, and knowledge entries—which are accessed via the Model Context Protocol (MCP).

Since inception, these containers were powered by Cloudflare Durable Objects (DO). However, we have since engineered a custom runtime from scratch. After rigorous benchmarking using identical data and judges, we are now migrating our initial workspaces to our own proprietary data plane.

Note: We still value Cloudflare. Our API, frontends, control plane, and general processing continue to run on Workers.

The Dilemma: Why Leave?

Durable Objects are an incredible tool for managing thousands of small, mostly dormant stateful units. In terms of development velocity, they are nearly unmatched. However, we hit four critical walls:

1. The Vector Gap

Retrieval is the core function of a container. Previously, embeddings were stored in Vectorize (a separate service). This created:

  • Local data access →\rightarrow→ A network hop on the most critical path.
  • State synchronization risks (potential for drift).
  • Limitation: DO SQLite does not support extensions, meaning the index could not be moved inside the object.

2. Compute-Data Locality

Retrieval isn't a single step; it's a pipeline: Hybrid Generation→Fusion→Query Expansion→Wide Rerank\text{Hybrid Generation} \rightarrow \text{Fusion} \rightarrow \text{Query Expansion} \rightarrow \text{Wide Rerank}Hybrid Generation→Fusion→Query Expansion→Wide Rerank

With DOs, only a tiny fraction of this logic lived with the data. The rest was offloaded to external services, adding variance to the critical path of agent tool loops.

3. Rigid Placement & Isolation

  • Static Location: Placement is decided at creation. If a container is spawned in London, it stays there, even if the agent fleet calling it is in Virginia.
  • Shared Resources: We lacked the ability to offer "isolation as a tier" (e.g., dedicated machines for premium workspaces).

4. Sovereignty

Regulated clients frequently require the ability to self-host their containers on infrastructure they fully control—something impossible with a proprietary platform like DO.


The New Architecture

We have shifted to a model where each organization is assigned a single host process running Bun on Fly Machines.

Technical Specifications

  • Storage: Each container is a single SQLite file. We integrated sqlite-vec to keep the vector index embedded, allowing candidate retrieval to happen in-process.
  • Persistence: We use snapshots stored in object storage, ensuring a container can be reconstructed byte-for-byte anywhere.
  • Routing: A regional router ensures containers are placed near the caller.
  • Security: The control plane communicates with the data plane via signed requests, ensuring it never touches actual container content.

Performance Benchmarks

The transition yielded significant improvements in latency and accuracy.

MetricCloudflare DO (Old)Custom Runtime (New)
Warm Tool Call≈0.4s\approx 0.4\text{s}≈0.4s (spikes to 2s2\text{s}2s)≈0.3s\approx 0.3\text{s}≈0.3s (steady)
Idle Wake-up3.7s3.7\text{s}3.7s1.4s1.4\text{s}1.4s
Recall@578.1%78.1\%78.1%89.1%89.1\%89.1%

Regarding the wake-up time: this isn't a "cold start" issue (isolates wake in ms), but rather the end-to-end time to readiness.

The "Honest Read" on Recall

The jump in Recall@5\text{Recall@5}Recall@5 isn't solely due to architecture; we also upgraded our embedding model. However, the new architecture makes expensive operations affordable. In-process retrieval allows us to over-fetch and rerank widely, and small per-container indexes enable exact nearest-neighbor search.


Reclaiming Durability

Durable Objects provide single-writer consistency and durability out of the box. Moving away meant we had to "buy" these guarantees back through engineering.

The Failure Point: Our initial version was only "durable at the next checkpoint." During soak tests where we intentionally killed machines under load, we discovered that several acknowledged writes were simply lost.

The Solution: We implemented a stricter write-ahead log (WAL) protocol:

-- Conceptual logic for the new durability layer
BEGIN TRANSACTION;
-- 1. Write to WAL
-- 2. Sync WAL frame to Object Storage
-- 3. ACK to client only after storage confirmation
COMMIT;

By using group commit, we keep this overhead to roughly 100ms100\text{ms}100ms, ensuring that a crashed machine cannot take acknowledged data with it.


Current Status & Roadmap

The migration is transparent to the end-user. We've maintained the same URLs, REST APIs, and MCP tools. Agents continue calling the same addresses; only the underlying runtime has changed.

Migration Checklist:

  • Beta launch (Preview environment)
  • Opt-in production workspaces
  • Full production migration (pending durability "tripwires")
  • Open-source the container runtime

Architecture Diagram Placeholder

Wire: Transforming documents into structured, AI-optimized context containers.