test web application ? siege ?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
johnhelen
Forum Commoner
Posts: 45
Joined: Mon Feb 19, 2007 9:17 pm

test web application ? siege ?

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

1000 database reads and writes per second would normally indicate that you need a dedicated database server.
johnhelen
Forum Commoner
Posts: 45
Joined: Mon Feb 19, 2007 9:17 pm

Thanks

Post 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
Post Reply