Skip to content

Make a decision whether we should enable TCP_NODELAY by default or not #3917

@JohnTitor

Description

@JohnTitor

The problem here should be related to Nagle’s algorithm, i.e. the TCP_NODELAY option.
On Node.js, it's enabled by default: https://nodejs.org/api/http.html#httpcreateserveroptions-requestlistener
On actix-web (actix-http), it's disabled by default (no config).
I've tested on your benchmark and confirmed enabling it via actix_tls resolved the latency difference.
Maybe we should make it enable by default, but it's a behavior change and should happen on major release.
For now, I'm going to add a helper method to enable it easily.

Originally posted by @JohnTitor in #3841

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions