Repository navigation
Conversation
1 task done
5 tasks done
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
A delegated generation worker reads upstream data into an unbounded deque while the HTTP response writer sends to the client. When that client pauses, the worker can consume the entire upstream stream and retain it in the proxy. A real TCP regression demonstrates the base buffering an unread 64 MiB stream in under a second.
Pause the producer when queued SSE data reaches 256 KiB (plus at most one receive chunk) and resume it when the writer removes data. Cancellation wakes waiting producers before stopping the upstream HTTP client. Non-streaming replies append directly to their final body buffer, so they do not wait behind the streaming queue budget or retain a second deque copy.
Area
edge0-infer/)How was it tested?
Base:
bc2dc409d420097b4e864d511901180d7c2c6bac; Linux, GCC 14.2, CPU preset.proxy,live_progress,dialects,interrupted_responses, andlifecycleintegration functions pass. These include normal streams, all three protocols, accounting, transport failures, SIGINT/SIGTERM, abrupt child exit and cleanup.moe_test_app_generation(std::tmpfileunavailable),moe_test_platform_memory(existing Linux expectation), and existing extreme-float serialization inmoe_test_ordered_json/moe_test_template_tools.git diff --checkpass. The bound concerns the relay queue; this is not a claim about total process RSS, kernel socket buffers, or inference throughput.Checklist