4 ms·
Do many Go programs really have 100,000 goroutines simultaneously? I'm certain that's quite rare.
by pcwalton 7y ago
Do many Go programs really have 100,000 goroutines simultaneously? I'm certain that's quite rare.
- saturn_vk 7y agoWell, even if you do not do any parallel work for each request in your service, each request in itself is a goroutine. So depending on the load of that service, you might reach such numbers, and more.
- stickupkid 7y agoWorking as part of Juju project, I can tell you for certain that the answer here is yes, very much so.
- pcwalton 7y agoIf you have over 100,000 threads, then you are at the point of scalability where you probably want more than what Go can provide. Async I/O would likely be better for your use case, because even 2kB of stack per thread is 195MB just from thread stacks.