You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context
Garnet’s multi-threaded architecture is designed for high-throughput, but the current reliance on TCP-based RESP creates a bottleneck at the transport layer. Even with Garnet's internal efficiencies, standard TCP suffers from Head-of-Line (HoL) blocking and requires clients to manage complex connection pools to achieve high parallelism.
I propose exploring a RESP over QUIC implementation. By leveraging QUIC’s native stream multiplexing, we can evolve Garnet beyond the 2009-era protocol assumptions of Redis and position it as the reference implementation for modern, cloud-native caching.
The Potential Upsides
Performance & Concurrency
True Parallel Execution: Move beyond pipelining to genuine concurrency at the transport layer. Independent streams can fan out across Garnet’s cores without artificial serialization.
Reduced Tail Latency: Because QUIC handles loss recovery per-stream, a slow operation or packet loss on one key won't delay responses for unrelated keys.
0-RTT Reconnection: Essential for cloud environments where network blips are common; clients can resume sessions instantly.
Scalability & Efficiency
Connection Collapsing: Instead of clients opening dozens of TCP connections to parallelize work, QUIC multiplexing allows a single connection to handle thousands of concurrent streams, drastically reducing server-side overhead.
Better Load Handling: QUIC’s congestion control is per-connection, but because recovery is per-stream, a "hot key" causing retransmissions won't tank the throughput for the rest of the traffic.
Security by Default: QUIC mandates TLS, ensuring a better security posture out of the box without the configuration complexity often associated with TLS-over-TCP.
Proposed Technical Implementation
A "RESP over QUIC" extension could be implemented with minimal changes to the core engine:
Request IDs in RESP Framing: A lightweight addition to the wire format to allow the client to match out-of-order responses to requests.
Stream-per-Operation: The client groups independent operations and dispatches them on individual QUIC streams.
Preserving Atomicity: Transactions (MULTI/EXEC) would be pinned to a single stream to preserve ordering guarantees where they are strictly required.
Negotiated Shared Streams: WATCH or other dependent operations could negotiate a shared stream, falling back to ordered behavior only when semantically necessary.
Why Garnet?
Garnet is uniquely positioned to lead this shift. Because the server logic is already designed for high-concurrency multi-threading, the "delta" to support QUIC is primarily in the transport and framing layer rather than a total rewrite of the command processor.
I’d love to hear the maintainers' thoughts on whether a QUIC-based transport provider aligns with the current roadmap for Garnet.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Garnet’s multi-threaded architecture is designed for high-throughput, but the current reliance on TCP-based RESP creates a bottleneck at the transport layer. Even with Garnet's internal efficiencies, standard TCP suffers from Head-of-Line (HoL) blocking and requires clients to manage complex connection pools to achieve high parallelism.
I propose exploring a RESP over QUIC implementation. By leveraging QUIC’s native stream multiplexing, we can evolve Garnet beyond the 2009-era protocol assumptions of Redis and position it as the reference implementation for modern, cloud-native caching.
The Potential Upsides
True Parallel Execution: Move beyond pipelining to genuine concurrency at the transport layer. Independent streams can fan out across Garnet’s cores without artificial serialization.
Reduced Tail Latency: Because QUIC handles loss recovery per-stream, a slow operation or packet loss on one key won't delay responses for unrelated keys.
0-RTT Reconnection: Essential for cloud environments where network blips are common; clients can resume sessions instantly.
Connection Collapsing: Instead of clients opening dozens of TCP connections to parallelize work, QUIC multiplexing allows a single connection to handle thousands of concurrent streams, drastically reducing server-side overhead.
Better Load Handling: QUIC’s congestion control is per-connection, but because recovery is per-stream, a "hot key" causing retransmissions won't tank the throughput for the rest of the traffic.
Security by Default: QUIC mandates TLS, ensuring a better security posture out of the box without the configuration complexity often associated with TLS-over-TCP.
Proposed Technical Implementation
A "RESP over QUIC" extension could be implemented with minimal changes to the core engine:
Request IDs in RESP Framing: A lightweight addition to the wire format to allow the client to match out-of-order responses to requests.
Stream-per-Operation: The client groups independent operations and dispatches them on individual QUIC streams.
Preserving Atomicity: Transactions (MULTI/EXEC) would be pinned to a single stream to preserve ordering guarantees where they are strictly required.
Negotiated Shared Streams: WATCH or other dependent operations could negotiate a shared stream, falling back to ordered behavior only when semantically necessary.
Why Garnet?
Garnet is uniquely positioned to lead this shift. Because the server logic is already designed for high-concurrency multi-threading, the "delta" to support QUIC is primarily in the transport and framing layer rather than a total rewrite of the command processor.
I’d love to hear the maintainers' thoughts on whether a QUIC-based transport provider aligns with the current roadmap for Garnet.
Beta Was this translation helpful? Give feedback.
All reactions