Konstantin Petrukhnov
Konstantin Petrukhnov

Reputation: 770

How to test the performance of an http JSON server?

How to test the performance of an http server that serves and accepts only JSON requests (post and get)? I'm new to web testing, so tell me if I'm trying to do it in incorrect way.

I want to test if:

One way is to write some logic that repeats certain actions per run, and run multiple of them.

PS: Ideally, the tool/method should support compression like gzip as an option.

Upvotes: 2

Views: 1151

Answers (3)

Ilia
Ilia

Reputation: 543

You can try JMeter and it's HTTPSampler. About gzip. I've never used it in JMeter, but it seems it can: How to get JMeter to request gzipped content?

Upvotes: 2

Brian Lyttle
Brian Lyttle

Reputation: 14579

If you are new to web testing then there are a lot of factors that you need to take into account. At the most basic level you want to do the things you have outlined.

Beyond this you need to think about how poorly performing clients might impact your service eg. keeping connections alive, sending malformed requests etc. These may translate into exceptions on the server which might in turn have additional impact (due to logging or slower execution). This means that you have to think of ways to break the service and monitor events that have an impact at higher scales.

Microsoft have a fairly good introduction to performance testing for web applications.

Upvotes: 1

Justin Thomas
Justin Thomas

Reputation: 5848

Apache Bench (ab) is a command line tool that's great for these kinds of things. http://en.wikipedia.org/wiki/ApacheBench

ab -n 100 -c 10 http://www.yahoo.com/

Upvotes: 1

Related Questions