Skip to content

Please use TCP_NODELAY at least for websockets. #664

@socketpair

Description

@socketpair

sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

Tornado use TCP_NODELAY at the end of every message. i.e. when tornado knows that this is last chunk written, it issue TCP_NODELAY setting to 1. After write buffer is flushed, it set TCP_NODELAY to 0.

This is helps alot. For example, see https://github.com/benjamin-hodgson/asynqp/pull/41/files and tornado sources against TCP_NODELAY

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions