Budiono Darmawan

an eCommerce Wizard

Build Your Own $5 Siege Server

What is siege server?

Based on wikipedia,

Siege is a Hypertext Transfer Protocol (HTTP) and HTTPS load testing and Web server benchmarking utility developed by Jeffrey Fulmer. It was designed to let web developers measure the performance of their code under stress, to see how it will stand up to load on the internet.

I short words, siege is a tool to measure how good is your server AND your web code!

Before we start below is the requirement:
1. Ubuntu / Debian server2. Basic knowledge of linux terminal

Let’s start!

  1. Update and upgrade

    sudo apt-get update && sudo apt-get upgrade -y

  2. Download lates siege. Click here to visit Siege website

    wget http://download.joedog.org/siege/siege-latest.tar.gz

  3. Extract it!

    tar -zxvf siege-latest.tar.gz

  4. Get into your siege directory.

    cd siege-*/

  5. Check whether you have GCC installed or not (GNU Compiler Collection). You can install it with command below.

    sudo apt-get install build-essential -y

  6. Install OpenSSL if you want to fire an https website.

    sudo apt-get install openssl

  7. Configure and finish your build!

    ./configure –with-ssl
    sudo make install

Then below is how to read the result:

The number of server hits. In the example, 25 simulated users [ -c25 ] each hit the server 10 times [ -r10 ], a total of 250 transactions. It is possible for the number of transactions to exceed the number of hits that were scheduled. Siege counts every server hit a transaction, which means redirections and authentication challenges count as two hits, not one. With this regard, siege follows the HTTP specification and it mimics browser behavior.
This is the percentage of socket connections successfully handled by the server. It is the result of socket failures (including timeouts) divided by the sum of all connection attempts. This number does not include 400 and 500 level server errors which are recorded in “Failed transactions” described below.
Elapsed time
The duration of the entire siege test. This is measured from the time the user invokes siege until the last simulated user completes its transactions. Shown above, the test took 14.67 seconds to complete.
Data transferred
The sum of data transferred to every siege simulated user. It includes the header information as well as content. Because it includes header information, the number reported by siege will be larger then the number reported by the server. In internet mode, which hits random URLs in a configuration file, this number is expected to vary from run to run.
Response time
The average time it took to respond to each simulated user’s requests.
Transaction rate
The average number of transactions the server was able to handle per second, in a nutshell: transactions divided by elapsed time.
The average number of bytes transferred every second from the server to all the simulated users.
The average number of simultaneous connections, a number which rises as server performance decreases.
Successful transactions
The number of times the server responded with a return code < 400.
Failed transactions
The number of times the server responded with a return code >= 400 plus the sum of all failed socket transactions which includes socket timeouts.
Longest transaction
The greatest amount of time that any single transaction took, out of all transactions.
Shortest transaction
The smallest amount of time that any single transaction took, out of all transactions.



Your email address will not be published. Required fields are marked *