News for hackers. Stuff that matters.
Re:Golang is evil on shitty networks by fragmede on Thursday December 29, 2022 @09:16PM (#34180980)
Most clients that OP deals with, anyway. If your code runs exclusively in a data center, like the kind I suspect Google has, then the situation is probably reversed.
Re:Golang is evil on shitty networks by vitus on Thursday December 29, 2022 @09:53PM (#34181250)
If you run all of your code in one datacenter, and it never talks to the outside world, sure. That is a fairly rare usage pattern for production systems at Google, though.

Just like anyone else, we have packet drops and congestion within our backbone. We like to tell ourselves that the above is less frequent in our network than the wider internet, but it still exists.

Re:Golang is evil on shitty networks by oefrha on Thursday December 29, 2022 @09:58PM (#34181282)
If your DC-DC links are regularly as noisy as shitty apartment WiFi routers competing for air time on a narrow band, fix your DC links.
Re:Golang is evil on shitty networks by mmis1000 on Thursday December 29, 2022 @10:44PM (#34181530)
Consider the rising of mobile device. The devices that don't have a good internet is probably everywhere now.

It's no longer like 10 years ago. You either have good internet or don't have internet. The devices that have shitty network grow a lot compare to the past.

Re:Golang is evil on shitty networks by Karrot_Kream on Friday December 30, 2022 @12:16AM (#34182068)
Almost every application I've written atop a TCP socket batches up writes into a buffer and then flushes out the buffer. I'd be curious to see how often this doesn't happen.
Re:Golang is evil on shitty networks by mmis1000 on Friday December 30, 2022 @12:45AM (#34182215)
Are you replying to the correct people? I think I never mention how you should write a program. I only say that assume user have a good internet connection is a naive idea nowadays. (The gta 5 is the worst example in my opinion, lost of a few udp packets and your whole game exit to main menu. How the f**k the dev assume udp packets never lost?)
Re:Golang is evil on shitty networks by Karrot_Kream on Friday December 30, 2022 @02:22AM (#34182752)
What I mean to say is that, whether or not your mobile device has bad internet or not shouldn't matter. Most applications are buffering their reads and writes. This makes TCP_NODELAY a non-issue

Most importantly buffering doesn't spend a whole bunch of CPU time context switching into the kernel. Even if you are taking advantage of Nagle's, every call to write is a syscall, which calls into the kernel to perform the write. On a mobile device this would tank your battery. This is the main reason writes are buffered in applications.

Re:Golang is evil on shitty networks by vidarh on Friday December 30, 2022 @11:19AM (#34186442)
This is basically the first thing I check if diagnosing performance issues with network apps. Most probably are buffering now, but surprisingly many don't. MySQLs client library for years didn't for example (it's probably been fixed for a decade or more at this point).