News for hackers. Stuff that matters.
Re:Go 1.17 Release Notes by zarzavat on Monday August 16, 2021 @08:02PM (#28204480)
Go is a replacement for a certain subset of C/C++ projects that are I/O heavy, e.g. web servers. However the GC precludes it from many uses of C/C++, e.g. you couldn't write an AAA game in it, or a kernel, or a toaster.
Re:Go 1.17 Release Notes by asadawadia on Wednesday August 18, 2021 @10:13AM (#28221152)
Yeah but how often do we meet toaster devs?
Re:Go 1.17 Release Notes by zarzavat on Friday August 20, 2021 @07:04AM (#28244727)
The toaster industry has a big problem with burnout.
Re:Go 1.17 Release Notes by vp8989 on Monday August 16, 2021 @09:11PM (#28204964)
GC is quite problematic for web servers too. Lots of people "solve" that by giving AWS more money.
Re:Go 1.17 Release Notes by theshrike79 on Tuesday August 17, 2021 @01:22AM (#28206485)
Web server workers, by definition, don't run for extended periods. Making them the perfect candidate for GC languages.

  1) Get request
  2) Serve request
  3) Get GC'd
No memory issues.
Re:Go 1.17 Release Notes by vp8989 on Tuesday August 17, 2021 @07:39AM (#28208782)
Serving web requests with ephemeral workers introduces some new problems though. Generally efficiency in this space comes from pooling, reusing connections, multiplexing etc ...

Ie. amortize expensive work over many requests.

Re:Go 1.17 Release Notes by Xenograph on Monday August 16, 2021 @11:53PM (#28206042)
Why is GC problematic for web servers?
Re:Go 1.17 Release Notes by vp8989 on Tuesday August 17, 2021 @07:33AM (#28208734)
Because GC will pause threads while requests are being served, this leads to latency spikes at the higher percentiles.

It introduces a whole distinct type of complexity into operating the server.

The latency of a request to your server is not just caused by the code that is ran to serve that request (which is how people intuitively would think about it), it can be caused by GC pauses that are happening because of the memory pressure caused by previous requests.