Skip to content

Comment on Multi-threading is always the wrong design (2023)parent

Comments

Isn’t Nginx multithreaded rather than multiprocess? I’m not an expert in web stuff but it’s always felt intuitively that worker threads map nocely into typical web server workloads.

Also, any UI app should basically be multithreaded to prevent interface hiccups.

No, nginx uses a fixed number of worker processes and communicates primarily through explicit shared memory and message passing.

Threading works ok, but there's rarely much shared state so the fork and pipe / she model wins cleaner and more secure.

As for UIs: maybe! I'm sure it depends, but this isn't an area I know a ton about

Interesting perspective, I’ve never been thinking about this problem in terms of whether workers need shared memory space. Thank you!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.