Cap'n Proto RPC Protocol

Cap'n Proto's RPC protocol is a capability-based RPC layer that supports promise pipelining, object references passed as arguments or return values, and time-travel optimizations that eliminate round trips. It is the foundation of Cloudflare Workers' inter- service communication and Sandstorm's capability-oriented sandbox.

API entry from apis.yml

apis.yml Raw ↑
aid: capn-proto:capn-proto-rpc
name: Cap'n Proto RPC Protocol
description: Cap'n Proto's RPC protocol is a capability-based RPC layer that supports promise pipelining,
  object references passed as arguments or return values, and time-travel optimizations that eliminate
  round trips. It is the foundation of Cloudflare Workers' inter- service communication and Sandstorm's
  capability-oriented sandbox.
humanURL: https://capnproto.org/rpc.html
tags:
- Capability-Based Security
- Protocol
- RPC
- Specification
properties:
- type: Specification
  url: https://capnproto.org/rpc.html
- type: Documentation
  url: https://capnproto.org/rpc.html
x-features:
- Capability-based security model
- Object (capability) references passed in messages
- Promise pipelining to eliminate round trips
- Bidirectional calls over a single connection
- Time-travel / path-compression optimizations
- Transport-agnostic (TCP, TLS, WebSocket, shared memory)
x-use-cases:
- Microservice RPC with low round-trip overhead
- Secure capability-oriented sandboxing (Sandstorm, Workers)
- Bidirectional streaming between trusted peers
- Inter-process communication with fine-grained authorization