René's URL Explorer Experiment


Title: Follow curl: Enable setNoDelay() / TCP_NODELAY by default on HTTP(S) 1.x · Issue #34185 · nodejs/node · GitHub

Open Graph Title: Follow curl: Enable setNoDelay() / TCP_NODELAY by default on HTTP(S) 1.x · Issue #34185 · nodejs/node

X Title: Follow curl: Enable setNoDelay() / TCP_NODELAY by default on HTTP(S) 1.x · Issue #34185 · nodejs/node

Description: Prior art Issues This has been discussed before without any conclusion: 2015-2018 in #906 2015 in nodejs/node-v0.x-archive#9235 Relatedly #906 and the discussion there has been mentioned: Recently, in the beginning of 2020, in #31539 as ...

Open Graph Description: Prior art Issues This has been discussed before without any conclusion: 2015-2018 in #906 2015 in nodejs/node-v0.x-archive#9235 Relatedly #906 and the discussion there has been mentioned: Recently,...

X Description: Prior art Issues This has been discussed before without any conclusion: 2015-2018 in #906 2015 in nodejs/node-v0.x-archive#9235 Relatedly #906 and the discussion there has been mentioned: Recently,...

Opengraph URL: https://github.com/nodejs/node/issues/34185

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Follow curl: Enable setNoDelay() / TCP_NODELAY by default on HTTP(S) 1.x","articleBody":"# Prior art\r\n\r\n## Issues\r\n\r\nThis has been discussed before without any conclusion:\r\n\r\n* 2015-2018 in #906\r\n* 2015 in https://github.com/nodejs/node-v0.x-archive/issues/9235\r\n\r\nRelatedly #906 and the discussion there has been mentioned:\r\n\r\n* Recently, in the beginning of 2020, in #31539 as well as #31541\r\n\r\n## Commits\r\n\r\nThe `setNoDelay()` option was originally introduced in 2009 in https://github.com/nodejs/node/commit/e0ec0036ca2cee7317f63e6462b9631067cf1e38 and was shipped in [v0.1.12](https://github.com/nodejs/node/releases/tag/v0.1.12)\r\n\r\n# Wider context\r\n\r\n## curl\r\n\r\nIn 2016 curl changed it's behavior from being like the one in Node.js to instead be setting `TCP_NODELAY` by default. See https://github.com/curl/curl/commit/4732ca5724072f132876f520c8f02c7c5b654d9 which was released in [v7.60.2](https://curl.haxx.se/mail/archive-2016-09/0013.html).\r\n\r\nMotivation from commit:\r\n\r\n\u003e After a few wasted hours hunting down the reason for slowness during a TLS handshake that turned out to be because of TCP_NODELAY not being set, I think we have enough motivation to toggle the default for this option. We now enable TCP_NODELAY by default and allow applications to switch it off.\r\n\r\n## npm modules\r\n\r\n### agentkeepalive\r\n\r\nThe [agentkeepalive](https://github.com/node-modules/agentkeepalive) module, with ≈3.5 million weekly downloads, pushes its non-configurable default of `socket.setNoDelay(true)` as one of its major benefits.\r\n\r\nIt was added in https://github.com/node-modules/agentkeepalive/commit/c92f5b5bd852c43a8a30700d78c1a02d239d19e4 and references a [Scaling node.js to 100k concurrent connections!](https://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/) blog post to explain it.\r\n\r\nUsed by eg. [eggjs/egg](https://github.com/eggjs/egg), [cnpm/cnpmjs.org](https://github.com/cnpm/cnpmjs.org), [pubnub/javascript](https://github.com/pubnub/javascript), [googlemaps/google-maps-services-js](https://github.com/googlemaps/google-maps-services-js), [node-modules/urllib](https://github.com/node-modules/urllib)\r\n\r\n### superagent\r\n\r\nIn 2017 the [superagent](https://github.com/visionmedia/superagent/) module, also with ≈3.5 million weekly downloads, merged https://github.com/visionmedia/superagent/pull/1240 and made `socket.setNoDelay(true)` its non-configurable default, largely arguing that there was no need for any buffering.\r\n\r\n### Other npm modules\r\n\r\nMany modules relies on the default behaviour of Node.js, and thus does not disable any delay by default.\r\n\r\nA quick glance puts all of these in that category, none of them directly calls `setNoDelay` (though they could eg. use something like the agentkeepalive module): `axios`, `bent`, `got`, `node-fetch`, `request`, `unfetch`\r\n\r\n## Documentation\r\n\r\nThe Node.js documentation of `setNoDelay` was recently updated: https://github.com/nodejs/node/pull/31541\r\n\r\nBefore that update, my perception is that many believed that Nagle's algorithm wasn't enabled by defaults, as proved by eg. the conversation in superagent: https://github.com/visionmedia/superagent/pull/1240\r\n\r\n# Proposed change\r\n\r\nTo make `TCP_NODELAY` / `setNoDelay` the default for HTTP(S) 1.x + maybe introduce a `setDelay()` method to disable it.\r\n\r\nProbably in a new major version, as it can be a breaking change in some contexts.\r\n\r\n## Why \r\n\r\nI believe that the expectations has changed since `setNoDelay` was introduced in 2009.\r\n\r\nWith eg. curl now setting it by default I believe most expects `TCP_NODELAY` / `setNoDelay` to be set by default and thus Nagle's algorithm to be disabled by default.\r\n\r\nThe confusion the current default seems to make in issues like https://github.com/visionmedia/superagent/pull/1240, especially before #31541, supports that.\r\n\r\nAlso: As `TCP_NODELAY` / Nagle's algorithm is implemented at an OS level this can also have a minor added benefit of improved cross-platform behavior, as no platform will add a delay.\r\n\r\n## Benefits\r\n\r\n* Better comply with general expectations among developers\r\n* Move with the times and in sync with other major players like `curl`\r\n* In some cases better performance due to no delay. Especially so in real time scenarios.\r\n\r\n## Downsides\r\n\r\n* Possibly increased bandwidth use\r\n* Possibly decreased performance due to bandwidth saturation\r\n* As any change of a default on this level, it breaks the expectations of those who knowingly wants the current default behaviour.\r\n\r\n# My background\r\n\r\nI have no expertise in the implementation of Nagle's algorithm or the TCP-stack in general, though I became intrigued by this and did my research and through that research I found that most were either confused by this or had already changed the default for this.\r\n\r\nComments, suggestions, feedback and link to other discussions would be most helpful.","author":{"url":"https://github.com/voxpelli","@type":"Person","name":"voxpelli"},"datePublished":"2020-07-03T16:51:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/34185/node/issues/34185"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a27d4be5-54d6-2b9d-fda8-096fc3354200
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCD9A:C2F0E:17DAADC:22A137F:6A4CEBBE
html-safe-nonce138b45ebb0355832e0886dee01030281424cc429d2de04b1c51bcd6b3ca1a2c1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDlBOkMyRjBFOjE3REFBREM6MjJBMTM3Rjo2QTRDRUJCRSIsInZpc2l0b3JfaWQiOiIyMDAyMTIzNDM2NTg3ODA1NjMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac81f0032cb42f5ece5c4f2158e8827552b02d5eb0f7028031ca7573025f71a5d0
hovercard-subject-tagissue:650695151
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/34185/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2edcd4531a3142166986a35cb7cdbc3b1dda238ecbea9214d5c643f32854a369/nodejs/node/issues/34185
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2edcd4531a3142166986a35cb7cdbc3b1dda238ecbea9214d5c643f32854a369/nodejs/node/issues/34185
og:image:altPrior art Issues This has been discussed before without any conclusion: 2015-2018 in #906 2015 in nodejs/node-v0.x-archive#9235 Relatedly #906 and the discussion there has been mentioned: Recently,...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevoxpelli
hostnamegithub.com
expected-hostnamegithub.com
None299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec5a57f04eeb310f57c73fd6d751d957e2ca27ed2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/issues/34185#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F34185
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F34185
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/34185
Reloadhttps://github.com/nodejs/node/issues/34185
Reloadhttps://github.com/nodejs/node/issues/34185
Please reload this pagehttps://github.com/nodejs/node/issues/34185
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/issues/34185
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 959 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
#42163https://github.com/nodejs/node/pull/42163
Follow curl: Enable setNoDelay() / TCP_NODELAY by default on HTTP(S) 1.xhttps://github.com/nodejs/node/issues/34185#top
#42163https://github.com/nodejs/node/pull/42163
netIssues and PRs related to the net subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22net%22
https://github.com/voxpelli
voxpellihttps://github.com/voxpelli
on Jul 3, 2020https://github.com/nodejs/node/issues/34185#issue-650695151
net: enable TCP_NODELAY by default on all platforms #906https://github.com/nodejs/node/issues/906
Default nodelay value needs to be set for all sockets.  node-v0.x-archive#9235https://github.com/nodejs/node-v0.x-archive/issues/9235
#906https://github.com/nodejs/node/issues/906
http: Add noDelay to http.request() options. #31539https://github.com/nodejs/node/pull/31539
docs: Reword socket.setNoDelay() #31541https://github.com/nodejs/node/pull/31541
e0ec003https://github.com/nodejs/node/commit/e0ec0036ca2cee7317f63e6462b9631067cf1e38
v0.1.12https://github.com/nodejs/node/releases/tag/v0.1.12
curl/curl@4732ca5https://github.com/curl/curl/commit/4732ca5724072f132876f520c8f02c7c5b654d9
v7.60.2https://curl.haxx.se/mail/archive-2016-09/0013.html
agentkeepalivehttps://github.com/node-modules/agentkeepalive
node-modules/agentkeepalive@c92f5b5https://github.com/node-modules/agentkeepalive/commit/c92f5b5bd852c43a8a30700d78c1a02d239d19e4
Scaling node.js to 100k concurrent connections!https://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/
eggjs/egghttps://github.com/eggjs/egg
cnpm/cnpmjs.orghttps://github.com/cnpm/cnpmjs.org
pubnub/javascripthttps://github.com/pubnub/javascript
googlemaps/google-maps-services-jshttps://github.com/googlemaps/google-maps-services-js
node-modules/urllibhttps://github.com/node-modules/urllib
superagenthttps://github.com/visionmedia/superagent/
forwardemail/superagent#1240https://github.com/forwardemail/superagent/pull/1240
#31541https://github.com/nodejs/node/pull/31541
forwardemail/superagent#1240https://github.com/forwardemail/superagent/pull/1240
forwardemail/superagent#1240https://github.com/forwardemail/superagent/pull/1240
#31541https://github.com/nodejs/node/pull/31541
netIssues and PRs related to the net subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22net%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.