Citation needed. Name a big company using nginx on Linux to serve up lots of static content.
> Yes, yes we know *BSD has a better networking stack than Linux.
Who mentioned anything about a network stack?
> Now that you're done letting everyone know how smart you are
Well given some people like you clearly don't understand the point I was making I think justifies the comment in the first place.
Facebook[1], Reddit[2], Wordpress[3]
[1] http://venturebeat.com/2012/06/18/nginx-the-web-server-tech-...
[2] https://news.ycombinator.com/item?id=8244868
[3] http://searchdns.netcraft.com/?host=wordpress.com&x=0&y=10
...and it was 9x not 8x...
The particular issue is: "The asynchronous interface requires the O_DIRECT flag to be set on the file descriptor, which means that any access to the file will bypass the cache in memory and increase load on the hard disks. That definitely doesn’t make it optimal for many cases.
To solve this problem in particular, thread pools were introduced in NGINX 1.7.11"
So, NGINX doesn't think it's crazy to deploy on linux. And no, Windows is not a better option. "only the select() connection processing method is currently used, so high performance and scalability should not be expected." http://nginx.org/en/docs/windows.html
[0] https://www.netmarketshare.com/operating-system-market-share...
[1] http://w3techs.com/technologies/details/os-freebsd/all/all
And your advice is to use experimental[1] Docker support in FreeBSD, when Nginx would be running inside Docker on top of FreBSD's Linux compatibility layer.
Finally - and most critically - Ngnix introduced thread pools to specifically work around a limitation of Linux's async IO implementation:
Although Linux provides a kind of asynchronous interface for reading files, it has a couple of significant drawbacks. One of them is alignment requirements for file access and buffers, but NGINX handles that well. But the second problem is worse. The asynchronous interface requires the O_DIRECT flag to be set on the file descriptor, which means that any access to the file will bypass the cache in memory and increase load on the hard disks. That definitely doesn’t make it optimal for many cases.
To solve this problem in particular, thread pools were introduced in NGINX 1.7.11.[2].
[1] https://wiki.freebsd.org/Docker
[2] https://www.nginx.com/blog/thread-pools-boost-performance-9x...