Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The first API used watching a set of non blocking sockets in the Berkeley sockets API was the select call. It has the problem performance degrades as you increase the number of sockets in the array it watchs significantly.

This was called the socket https://en.wikipedia.org/wiki/C10k_problem .

It turned out that it is possible to solve this problem using the following different APIs on each of the major operating systems:

It’s relatively simple to write an abstraction library which will work with epoll and kqueue since both APIs work in a similar fashion - they will tell the application when a socket can be read from or be written to or it has closed.

But IOCP works with a completely different paradigm - you basically have to give the operating system a bucket of memory to read from or write to or fill with data from a connecting socket. The first time I learned this was frustrating since I had to completely throw away my first implementation - the needs of IOCP changed how my interfaces worked.

This is why nginx to this day isn’t optimized to run on Windows.

So is Windows and IOCP worth supporting? As much as I would like to say no, the issue is that windows remains an important operating system for most enterprises.

  • No labels