Skip to content

Direct binary writes aren't asynchronous #2444

Closed
Closed

Description

@roji

When writing user-provided binary data, we have two cases:

  1. If the user data is small and fits in our write buffer, we copy it there just like any other value.
  2. If it's bigger than the buffer, we flush the buffer and then write the user data directly to the socket.

The logic is to minimize system calls/TCP packets for small user data, but bypass the internal buffer for larger data (saving the in-memory copying).

The direct write mechanism is currently implemented synchronously with no async option.

Activity

  1. added this to the 4.1 milestone on Apr 18, 2019
  2. self-assigned this
    on Apr 18, 2019
  3. added a commit that references this issue on Apr 18, 2019
  4. added a commit that references this issue on May 3, 2019
  5. modified the milestones: 4.1, 5.0 on Aug 26, 2019
  6. roji commented on Oct 7, 2020

    @roji
    MemberAuthor

    This was already done for 4.1 in 951dc83

  7. modified the milestones: 5.0.0, 4.1.0 on Oct 7, 2020
  8. added theissue type on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions