Remix.run Logo
▲ gzapp 3 hours ago

That part about the threading was a huge source of issues back in the early days. Goroutines could hop threads and it's the threads namespace/cgroup configuration that gets inherited when forking..

One of the gnarliest issues I recall was where network namespaces could occasionally not be cleaned up correctly. So "randomly" (but more likely under certain loads) the networking of a reused thread would get jacked and Docker could no longer pull images.

▲dboreham 2 hours ago | parent [-]

Never, ever, ever, write your own userland threading library.

(rule broken by almost every language in common use, unfortunately)

▲eddythompson80 24 minutes ago | parent | next [-]

That’s an absurd statement. Optimizing every language around what a runc-like program would is absurd.

▲creata an hour ago | parent | prev [-]

Where does this advice come from? Most web servers would use a lot more resources if they didn't use userland threading, wouldn't they?

▲gertop 4 minutes ago | parent [-]

I think you're confusing userland threading (also known as green threads) with a regular thread pool implementation (that uses regular OS threads).

Because most web servers use OS threads. Nginx, Apache, litespeed, they all spin up `core count` threads but they can all work single threaded just fine as well.