Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture

This section explains how the gateway is put together and why the main boundaries exist.

🧭 Read this when changing the hot path. The architecture pages keep request handling, config lookup, backend sessions, transports, and control-plane boundaries explicit.

The pages are ordered for a first read: start at the top for the big picture, then work down into each boundary. If you are changing one area, jump straight to its page.

PageWhat it covers
🧭 System ShapeThe gateway’s role in ContextForge, its crate layout, and the line between dataplane and control plane.
πŸ”€ Request FlowThe ordered path from downstream HTTP request to backend MCP call and merged response.
🧡 Concurrency And Runtime ModelExecutor shapes, shared state and locks, fanout, cancellation, and the allocator.
πŸ” Authentication And User Config LookupHow JWT claims, Redis-backed user config, and virtual host selection combine before routing.
πŸ”’ Security Model And Trust BoundariesWhat the gateway trusts, what compromise of each boundary means, and transport security posture.
πŸ—‚οΈ Runtime ConfigurationThe current UserConfig model, MessagePack Redis persistence, cache behavior, and expected growth.
🀝 Control-Plane IntegrationThe current, still-provisional integration surface: Redis keys, schemas, token shape, and route parity.
πŸ”Œ Backend Connections And TransportsDownstream listeners, upstream RMCP transports, config-store transport, and TLS direction.
🧡 Session OwnershipHow backend services are keyed, shared, cleaned up, and constrained by local process ownership.
🧱 Architectural ChoicesThe main tradeoffs behind dataplane scope, namespacing, config boundaries, and future protocols.