Local-first architecture
Direct works at both ends of every request: the client sits close to your app, and the network sits close to the RPC nodes. This page follows a single request through both, so you can see where each answer actually comes from.
Following a request
- Your app makes a normal JSON-RPC callto the Direct client — exactly as it would to any RPC endpoint.
- The client answers instantly when it can. If the data is already synced locally, it returns straight away, with no network round trip.
- Otherwise it goes to the network.The client routes the request across the peer-to-peer network to the best available nodes — and can send it to several at once for a quorum check when you need one.
- You get a standard response back through the client, as plain JSON-RPC.
The client is the on-ramp; the network does the work.
What the client does locally
Direct’s clients keep the most commonly requested data in sync locally, so step 2 above resolves without ever leaving your machine. Popular reads come back in sub-milliseconds, and when the client does need fresh data, Direct Sync sends only what changed since your last request.
→ Local-first syncing explains how the local copy is kept trustworthy, and Data integrity covers quorum checks across multiple providers.
What the network does
On a cache miss the request is routed across a peer-to-peer mesh of RPC nodes rather than a single endpoint. Relay nodes inside the network track which nodes are healthy, fast, and well-priced, and spread load across many of them for throughput and failover — with no central controller to become a bottleneck.
→ The Network covers routing, providers, and wholesale access in detail.