Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The king of the hill for high-speed static web serving is asynchronous I/O, at least the last time it looked. At one point there was a web server called 'Zeus' that used this type of architecture. It was specifically designed for serving high-volume static content - guess which industry.</p> <p>Threading and synchronisation is more expensive than you think. Asynchronous architecture is used quite widely in servers and can be made very resource efficient. Often a single thread is so fast that it can outrun multi-threaded servers by a considerable margin. </p> <p>Using asynccore (a Python async server framework) I could make a single threaded XML-RPC server that could connect to a database, issue a simple query, cose the connection and reply to the request faster than a multi-threaded server with a thread pool. On a single CPU machine it was about 2.5x faster.</p> <p>Rolling your own async server isn't that hard. I've seen them assigned as second-year computer science assignments. You can probably find Async web server libraries for most languages - Python comes with one in the standard library.</p> <p>Finally, I don't have much time for people saying 'do it but it must be done in two weeks.' If your business case can only justify two weeks development time, consider not bothering - the business case is too marginal unless it really is low-hanging fruit. I mechanically translate a marginal business case to no business case at all. If it's important give me time to do it for real. If it's not important don't do it at all. </p> <p>There we go - just saved you two weeks and all the ongoing maintenance costs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload