acmpesuecc / acmpesuecc/zaprpc

feat(transport): implement 0-RTT methods

Aperta
#6 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bounty 1500 enhancement
Lingua principale
Go
Stelle
0
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Description

Implement QUIC 0-RTT (zero-round-trip) handshake support in zaprpc, allowing clients to initiate RPC requests immediately on resumed sessions!

QUIC 0-RTT allows previously authenticated clients to send requests immediately on connection resumption, improving latency for RPC calls.

## Expected Work

- Implement the `ServeEarly` method for `Server`, using the `AcceptEarly` method from `quic-go` and allowing users to opt in to rejection of unsafe early data (eg: non idempotent methods), make sure `handleSession` is updated accordingly
- Implement `NewEarlyConn`, similar to `NewConn`, making sure it uses the `DialEarly` method from `quic-go` and TLS Session Resumption is opted in for by the user with TLS `ClientSessionCache`
- If `Zap` fails with 0-RTT, gracefully fallback to normal handshake

## References
- https://quic-go.net/docs/quic/server/
- https://quic-go.net/docs/quic/client/
- https://blog.cloudflare.com/even-faster-connection-establishment-with-quic-0-rtt-resumption/

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.