http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.46k stars 119 forks source link

Turn on TCP NO_DELAY by default? #322

Open Fishrock123 opened 3 years ago

Fishrock123 commented 3 years ago

@ericsampson mentioned to me that a lot of http clients turn this on by default.

Some ecosystem stats:

yoshuawuyts commented 3 years ago

Oh interesting; I vaguely remember TCP_NODELAY existing so that responses don't arrive from the future. But this may mostly be relevant for HTTP servers, less so for clients. The fact that most other clients do this makes it seem like we could probably too!

ericsampson commented 3 years ago

Yeah, my experience is from .NET and Java, both of which made this the default value for their HTTP client years ago for perf reasons.

Thanks!!

Firstyear commented 3 years ago

I'd support this change :)