News for hackers. Stuff that matters.
Re:Golang is evil on shitty networks by vbezhenar on Thursday December 29, 2022 @06:45PM (#34179676)
TLDR: Golang uses TCP_NODELAY by default on sockets. Seems wild. I guess it's time to disable TCP_NODELAY in Linux to fix bad software.
Re:Golang is evil on shitty networks by vasqw on Thursday December 29, 2022 @06:53PM (#34179757)
Yeah, let's just remove TCP_NODELAY and fuck all latency-sensitive applications.
Re:Golang is evil on shitty networks by perryizgr8 on Thursday December 29, 2022 @07:43PM (#34180162)
Actual latency sensitive apps can always use SOCK_RAW and implement their own TCP. In fact, for serious low latency you need to bypass the entire kernel stack too, like DPDK.
Re:Golang is evil on shitty networks by taneq on Thursday December 29, 2022 @09:11PM (#34180939)
“I know, instead of using TCP_NODELAY we can just roll our own ad-hoc reimplementation of TCP!”
Re:Golang is evil on shitty networks by withinboredom on Thursday December 29, 2022 @09:42PM (#34181167)
For serious though. TCP has a handshake to make a connection. UDP doesn’t and if you’re going for low-latency, you probably don’t want retransmission anyway, since if you miss the packet it’s too late to do anything about it. If you need the guarantees from TCP, you probably aren’t actually solving a low-latency problem.
Re:Golang is evil on shitty networks by lanstin on Thursday December 29, 2022 @11:59PM (#34181970)
Low latency SQL transactions? Not microseconds, but a ms or two is doable unless you have transient connections or Nagle + delayed acks.