Page 1 of 1

test web application ? siege ?

Posted: Fri Mar 09, 2007 2:22 pm
by johnhelen
Hello all

My application is simple, user enter a from_url, if the from_url is in database, it will be redirected to another site called to_url. So my database have "from_url" and "to_url" data. In this case, database has "read" action

"SELECT to_url FROM ......."

I also need to know the information about time hits to create a statistic report. In this case, it is "write" action.

My database is postgres. Server is Linux-apache.

Sometime, there may be 1000 hits per second. I want to know how my application - database copes with this.

The problem here is the production application database server has some other databases. Therefore, I need to test my application in my local computer first.

It can be seen that in my local computer, there is only one database. So "read" and "write" is fast. So , I tried to slow dow this "read" by adding one more line "usleep" for 0.01 second

<?php
..
$result = ... "SELECT ....."..
usleep(10000);
...

Then I will test application in concurrent situation. My question is that solution is correct or not ?

Can I use a tesing application as siege for testing my website (http://www.joedog.org/JoeDog/Siege)

I need your help, please

many thanks
shoa

Posted: Fri Mar 09, 2007 6:20 pm
by feyd
1000 database reads and writes per second would normally indicate that you need a dedicated database server.

Thanks

Posted: Fri Mar 09, 2007 9:13 pm
by johnhelen
Thanks, feyd

In fact, I use memcache for read (http://www.danga.com/memcached/). If there is from_url in the memcache, the application doesnot need to read. It will get key (from_url) and value ('to_url) from memcache. Therefore, in most cases, only write (to store time hit.....)

We also have a good server database server. However, I need to test this application in my computer. What is good way to do this.

Thanks