Introduction
Version: 0.1.0 | Features: Cluster Management, Streaming, Code Generation
RpcNet is a high-performance QUIC-based RPC library built on s2n-quic
. The library provides
high-level server and client primitives, TLS configuration helpers, rich support for
unary and streaming request flows, and complete distributed cluster management. This book
centralizes the user-facing materials so you can learn RpcNet in one place.
Key Capabilities
Core RPC
- TLS-first configuration for both client and server components
- Simple registration of request handlers with async closures
- Bidirectional, client-streaming, and server-streaming support
- Structured error reporting through
RpcError
- Test-friendly abstractions that allow mocking QUIC streams
Distributed Systems (v0.1.0+)
- Cluster Management: Built-in gossip protocol (SWIM) for node discovery
- Load Balancing: Multiple strategies (Round Robin, Random, Least Connections)
- Health Checking: Phi Accrual failure detection
- Tag-Based Routing: Route requests by worker capabilities
- Auto-Failover: Zero-downtime worker replacement
How To Read This Book
- Getting Started walks through installing RpcNet and creating your first service.
- Core Concepts introduces the configuration model, error types, and runtime fundamentals.
- Cluster Example demonstrates building distributed systems with automatic discovery and load balancing.
- Streaming Patterns covers bidirectional and one-way streaming.
- rpcnet-gen CLI explains the code generation tool and workflows.
Throughout the chapters you will find executable snippets based on the working examples in the repository.