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.
feat(scaling): engine.io socket flush deferral — modest tail-latency reduction at mid-load #7774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat(scaling): engine.io socket flush deferral — modest tail-latency reduction at mid-load #7774
Changes from 1 commit
073954df0661a9df6b84cf5b9143File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
`require('engine.io/build/socket')` cannot resolve, in two independent ways: engine.io is a transitive dependency of socket.io and therefore invisible from `src` under pnpm (MODULE_NOT_FOUND), and `build/socket` is not in engine.io's `exports` map, so the deep path fails with ERR_PACKAGE_PATH_NOT_EXPORTED even where the package is resolvable. The failure was downgraded to a warning, so `engineFlushDefer: true` left the stock synchronous flush in place and the feature was inert — which means the N=3 numbers in the PR description cannot have measured this patch. Resolve engine.io through its public entry point relative to socket.io instead, which also guarantees we patch the copy socket.io actually loaded rather than a second one a hoisting layout might provide. Also sync the copied body to the installed engine.io 6.6.9: upstream attaches the payload on a truthiness check, not `!== undefined`. New spec covers coalescing, packet order, the closing/closed early return, send callbacks, the callback-in-options-slot form, upstream's payload semantics, and pins the SHA of engine.io's own sendPacket so an upgrade that touches it fails here and forces a re-vet of the copy. It restores the prototype afterwards — otherwise every later spec in the suite runs with the feature silently enabled. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.