Skip to content

Limit vector count in client outbound flushes#5749

Closed
neilalexander wants to merge 1 commit intomainfrom
neil/clientmaxiov
Closed

Limit vector count in client outbound flushes#5749
neilalexander wants to merge 1 commit intomainfrom
neil/clientmaxiov

Conversation

@neilalexander
Copy link
Copy Markdown
Member

@neilalexander neilalexander commented Aug 5, 2024

The net.Buffers implementation in Go is a bit eager and tries to split across multiple writev syscalls if the input is greater than IOV_MAX, which can mean that once a large amount of data gets buffered, the write deadline can become insufficient. This PR modifies the approach so that we don't send more than 1024 vectors into net.Buffers.WriteTo() in one go.

Signed-off-by: Neil Twigg neil@nats.io

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Aug 5, 2024
This is a simpler PR than #5749 which just limits at the point of writing
rather than at the point of buffering/framing. It allows us to set the
deadline for each batch.

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Aug 5, 2024
This is a simpler PR than #5749 which just limits at the point of writing
rather than at the point of buffering/framing. It allows us to set the
deadline for each batch.

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Aug 6, 2024
This is a simpler PR than #5749 which just limits at the point of writing
rather than at the point of buffering/framing. It allows us to set the
deadline for each batch.

Signed-off-by: Neil Twigg <neil@nats.io>
derekcollison added a commit that referenced this pull request Aug 6, 2024
This is a simpler PR than #5749 which just limits at the point of
writing rather than at the point of buffering/framing. It allows us to
set the deadline for each batch.

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Aug 6, 2024
This is a simpler PR than #5749 which just limits at the point of writing
rather than at the point of buffering/framing. It allows us to set the
deadline for each batch.

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant