ttfb icon indicating copy to clipboard operation
ttfb copied to clipboard

Add 0-RTT

Open Seirdy opened this issue 10 months ago • 4 comments

When it's safe to use, 0-RTT can significantly reduce the TTFB. Measuring savings can help inform the cost-effectiveness of implementing safeguards against replay attacks and adopting 0-RTT; this tool is in the perfect position to help.

Seirdy avatar Apr 06 '24 14:04 Seirdy

Hey @Seirdy , thanks for the interest in my library. Can you please provide some more context regarding 0-RTT? Never really heard about it, TBH.

phip1611 avatar Apr 07 '24 18:04 phip1611

It allows servers to start sending data before completing a TLS handshake. Significantly reduces the TTFB over TLS, as only one round-trip is required (no extra round-trips with QUIC!).

Seirdy avatar Apr 19 '24 03:04 Seirdy

Does this require QUIC or does it also work with HTTP/1.1? That's not entirely clear to me?

phip1611 avatar Apr 19 '24 15:04 phip1611

I'm unsure how to implement this. Currently, the TLS connection is backed up by rustls. It seems to have 0-rtt support.

Unfortunately, I do not have the capacity now or in the next weeks to work on that. But I'd be happy to with reviewing contributions and eventually merging them.

On the long term, I'd like to have a CLI like this:

ttfb [--http11] [--http2] [--http3] [--quic]

including 0-RTT (possible via CLI flag) - but it takes some effort to do this.

phip1611 avatar Apr 19 '24 15:04 phip1611