1. 17
  1. 2

    The “goroutine-per-request” model and GC overhead greatly increase memory requirements in high-connection services like ours.

    I wonder if it would be possible to use one goroutine-per-core in order to avoid context-switching just like nginx does. (I’ve never used Go)

    1. 4

      Possible, but not natural in Go. Goroutines are lightweight threads and all libraries are written assuming this and most I/O is sync. You’d have to reinvent a lot to make I/O async in each per core goroutine.

      More likely someone will write a proxy like that in Rust. I’m eagerly awaiting…

      1. 2

        Linkerd is written in Rust.

      2. 3

        Go already does one OS thread per core (ish), goroutines are entirely a userspace thing without (kernel level) context switching. Still, there’s obviously some overhead associated with them.