Skip to main content
Palyra employs a multi-tier networking architecture designed for secure, low-latency communication between humans, daemons, and distributed nodes. The stack ranges from standard web protocols for operator interfaces to high-performance multiplexed transport for internal node synchronization.

Architecture Overview

The networking stack is divided into three primary functional planes:
  1. Operator Plane (HTTP/WS): Provides the REST and WebSocket APIs used by the Web Console and Desktop Companion via axum.
  2. Control Plane (gRPC): Facilitates structured communication between the CLI, Browser Daemon, and the Core Daemon using tonic.
  3. Data & Node Plane (QUIC): Handles high-throughput, mTLS-secured node-to-node communication and event streaming using quinn.

System Protocol Mapping

ProtocolImplementationPrimary Use CasePort / Service
HTTP/1.1+axumAdmin API, Static Assets, Webhookspalyrad (default 8080)
gRPCtonicAgent Control, Browser Automationpalyra-browserd, palyrad
QUICquinnNode Synchronization, Event Streamsnode.stream_events
WebSockettokio-tungsteniteReal-time Chat & A2UI Patches/console/v1/stream
Sources: crates/palyra-daemon/Cargo.toml#15-55, crates/palyra-daemon/src/quic_runtime.rs#13-16, crates/palyra-transport-quic/src/lib.rs#12-14

QUIC & mTLS Transport

The palyra-transport-quic crate provides a hardened wrapper around the quinn library, specifically tailored for the palyrad node architecture. It enforces palyra-quic-v1 as the ALPN protocol crates/palyra-transport-quic/src/lib.rs#14-14 and utilizes rustls for mandatory mutual TLS (mTLS) in node-to-node contexts. The QuicRuntime handles: For details, see QUIC Transport. Sources: crates/palyra-daemon/src/quic_runtime.rs#13-120, crates/palyra-transport-quic/src/lib.rs#12-176

Node Runtime & Control Plane

Palyra nodes are managed via a dedicated Control Plane that orchestrates enrollment and inventory. Communication in this plane is governed by palyra-identity, which manages the lifecycle of Ed25519 keypairs and X.509 certificates used for mTLS crates/palyra-identity/src/lib.rs#10-25. Key components include: For details, see Node Runtime & Control Plane. Sources: crates/palyra-identity/src/lib.rs#27-31, crates/palyra-identity/src/mtls.rs#149-164

HTTP & gRPC Services

The daemon integrates several protocol-specific crates to handle operator and integration traffic:
  • Axum (HTTP): Serves the Admin API and handles OpenAI-compatible completions. It includes middleware for security headers and session management crates/palyra-daemon/Cargo.toml#15-15.
  • Tonic (gRPC): Implements the AgentControlProtocol (ACP) used by the CLI and the browser.proto services used by palyra-browserd crates/palyra-daemon/Cargo.toml#49-50.
  • Tokio-Tungstenite (WS): Powers the real-time update stream for the Web Console, allowing the daemon to push A2UI patches to the frontend Cargo.toml#70-70.

Network Entity Relationship

Sources: crates/palyra-daemon/src/quic_runtime.rs#62-84, crates/palyra-transport-quic/src/lib.rs#17-35, crates/palyra-identity/src/mtls.rs#149-153

Child Pages