Expand description
§Request Multiplexing
High-performance request multiplexing over a single connection using request ID tagging. This is the key to beating Oracle’s OLTP performance:
- Eliminates connection pool exhaustion under high concurrency
- Allows thousands of concurrent requests over a handful of connections
- Sub-millisecond request routing via lockless hash map
- Zero-copy frame processing with per-request channels
§Architecture
- Each request gets a unique u64 ID (atomic counter)
- Sender tags outgoing requests with ID + payload
- Background task demuxes incoming responses by ID
- Per-request oneshot channels for response delivery
§Performance Characteristics
- O(1) request routing (DashMap lockless concurrent hashmap)
- Zero heap allocations per request (pre-sized buffers)
- Automatic cleanup of stale requests (timeout + memory pressure)
- Backpressure via in-flight limit (prevents OOM)
Structs§
- Multiplex
Config - Configuration for multiplexer
- Multiplex
Frame - Multiplexed request frame
- Multiplex
Metrics - Multiplexer metrics
- Multiplexer
- Request multiplexer for a single connection
Type Aliases§
- Request
Id - Unique request identifier (64-bit for collision-free namespace)