3 ms·
Unfortunately the batteries-included runtime of Go effectively forecloses any really high performance server code that scales well to huge machines. What it off
by jeffbee 5y ago
Unfortunately the batteries-included runtime of Go effectively forecloses any really high performance server code that scales well to huge machines. What it offers is moderately good and that's all you'll ever get. A Go web server will work OK on 8 cores and it will only go a bit faster on 32 cores and not at all faster, possibly slower, on 256 cores. Meanwhile Java async programs are still scaling up. These results are apparent if you look at the gRPC multi-language benchmarks.
There's only one way to write a server in Go and that has pros and cons.
- technosamay20 5y agoThanks for sharing this insight. Is this a issue with just the web server. If I have a standalone task, which tires to use 128 cores and manages parallel tasks using goroutines communicating via channels - will I be able to successfully leverage 128 cores.
- jeffbee 5y agoIf your tasks are large enough to dominate, then the non-scalability of the goroutine scheduler and the network stack won’t be an issue. For example, if your task is compressing some huge hunk of a video and it takes a second to do it, then it will scale fine. Then again, you can get this scalability from anything, including `xargs`.
- rawoke083600 5y agoInteresting.. Any sources or examples ?