It's always TCP_NODELAY. Every damn time

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • go

    The Go programming language

  • > And go is wrong for doing that, at least on Linux. It bypasses optimizations in the vDSO in some cases.

    Go's runtime does go through the vDSO for syscalls that support it, though (e.g., [0]). Of course, it won't magically adapt to new functions added in later kernel versions, but neither will a statically-linked libc. And it's not like it's a regular occurrence for Linux to new functions to the vDSO, in any case.

    [0] https://github.com/golang/go/blob/master/src/runtime/time_li...

  • libnodelay

    A small wrapper library that adds the TCP_NODELAY option for all sockets.

  • Thank you, found this: https://github.com/sschroe/libnodelay

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • John Nagle has posted insightful comments about the historical background for this many times, for example https://news.ycombinator.com/item?id=9048947 . He's a prolific HN commenter (#11 on the leaderboard) so it can be hard to find everything, but some more comments searchable via https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... or https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

  • curryer

    Fast Haskell RPC

  • Same here. I have a hobby that on any RPC framework I encounter, I file a Github issue "did you think of TCP_NODELAY or can this framework do only 20 calls per second?".

    So far, it's found a bug every single time.

    Some examples:

    * https://cloud-haskell.atlassian.net/browse/DP-108

    * https://github.com/agentm/curryer/issues/3

    I disagree on the "not a good / bad option" though.

    It's a kernel-side heuristic for "magically fixing" badly behaved applications.

    As the article states, no sensible application does 1-byte network write() syscalls. Software that does that should be fixed.

    It makes sense only in the case when you are the kernel sysadmin and somehow cannot fix the software that runs on the machine, maybe for team-political reasons. I claim that's pretty rare.

    For all other cases, it makes sane software extra complicated: You need to explicitly opt-out of odd magic that makes poorly-written software have slightly more throughput, and that makes correctly-written software have huge, surprising latency.

    John Nagle argues here and in linked threads that Delayed Acks are even worse. I agree. But the Send/Send/Receive receive pattern that Nagle's Algorithm degrades is a totally valid and common use case, including anything that does pipelined RPC over TCP.

    Both Delayed Acks and Nagle's Algorithm should be opt-in, in my opinion. It should be called TCP_DELAY, which you can opt-into if you can't be asked to implement basic userspace buffering.

    People shouldn't /need/ to know about these. Make the default case be the unsurprising one.

  • systemd

    The systemd System and Service Manager

  • node

    Node.js JavaScript runtime ✨🐢🚀✨

  • Since 2022 v.18.

    PR: https://github.com/nodejs/node/pull/42163

    Changelog entry: https://github.com/nodejs/node/blob/main/doc/changelogs/CHAN...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Gonna attempt syncthing through iSH. Hoping to additionally expose files using WebDav

    2 projects | /r/ish | 6 May 2023
  • Some ways DNS can break

    5 projects | news.ycombinator.com | 17 Jan 2022
  • Fixing Stutters in Papers Please on Linux

    5 projects | news.ycombinator.com | 2 Jan 2022
  • I Can Read C++ and Java But I Can’t Read Smalltalk (2000) [pdf]

    6 projects | news.ycombinator.com | 18 Dec 2021
  • “Static Linking Considered Harmful” Considered Harmful

    5 projects | news.ycombinator.com | 3 Oct 2021