Here is a post detailing an interesting setup of Web servers made to go against one another in real time. This could prove to be entertaining for benchmarkers or perhaps decisive for those who need an ultimate killer proof that their favorite Web server can kick some behind.
Definition of server Web benchmarking (according to Wikipedia):
It is the process of estimating a web server performance in order to find if the server can serve sufficiently high workload [sic].
In this article, I’m going to butcher this definition and depart from the tradition – a tad bit. Here are a some interesting questions that come to mind: What if the end goal is not to obtain measurements but to take a knock-out approach? What if we were to put three Web servers all against one another is a threesome match? Is the outcome of this death match meaningful? How do we select the winner? Switching gears forward a bit, could this death match approach be maliciously leveraged in a botnet situation?
Let’s dive right into the code! But first, let’s discuss the logic necessary to trigger, enable, and maintain a match until death occurs or an apparent draw ensues. The death match in this post is triggered via a single GET action from a regular browser and can be sent to any Web server (or all) that is participating in the fight. The trigger calls a server-side python script called bench.py, which in turns forks a threaded python program, called benchlet.py, that perpetuates the match. Each Web server participating in the death match receives a GET request and then resonates another similar multi-threaded request against the other Web server. This back and forth exchange escalates the match further and further…until death occurs.
The following video illustrates the trigger action and an excerpt from the match.
The mechanism used to trigger and maintain the match is written in python but it could be just about any server-side processing language like PHP or Ruby.
UNIXy is a fully managed server and cluster services providers with a focus on high traffic Web sites. Server and cluster management is offered courtesy at not extra costs to their clients. They have been offering Varnish acceleration to their clients for more than three years. They have released the first cPanel Varnish plugin as well as spun a new startup, Fastlayer, the on-demand HTTP accelerator for the cloud.
That’s all folks!