Stress Test Web Server Menggunakan Siege Tools

Stress Test Web Server Menggunakan Siege Tools

Siege merupakan tools untuk melakukan benchmarking dan juga stress test web server. Sangat berguna buat temen2 yang mau tau bikin simulasi lalu memproyeksikan performance web server ketika di hit oleh X user.

Pertama Instalasi Siege

[[email protected] ~]# wget http://download.joedog.org/siege/siege-3.0.9.tar.gz

[[email protected] ~]# tar -xvzf siege-3.0.9.tar.gz

[[email protected] ~]# cd siege-3.0.9

[[email protected] ~]# ./configure[[email protected] ~]# make && make install 

Remarks:

Setelah selesai instalasi buat direktori untuk log siege, direktori ini berguna untuk menyimpan log siege itu sendiri setiap selesai testing.

[[email protected] ~]# mkdir /usr/local/var

Kedua Simulasi Testing 

Install web server, di contoh ini menggunakan apache lalu buat simpel page index.html

[[email protected] ~]# yum install httpd -y

[[email protected] ~]# vim /var/www/html/index.html

#isi index html dengan code html simpel seperti dibawah ini

My First Heading

My first paragraph.

#setelah selesai save lalu 

start httpd service

[[email protected] ~]# /etc/init.d/httpd start

[[email protected] ~]# chkconfig httpd on

[[email protected] ~]# /etc/init.d/iptables stop

Setelah selesai, kamu bisa gunakan command siege untuk mulai proses stress testing/bencmarking.

Contoh:

Simulasi 50 users hit web server secara simultan, dengan delay up to 10 seconds antara requests gunakan command dibawah ini

[[email protected] ~]# siege -d10 -c50 http://yourpageoripaddress