Tsung is a testing tool used to stress servers and see how they perform under high load conditions. It’s designed to work both with the HTTP/HTTPS and the Jabber protocols, and it seems that stressing PostgreSQL servers will be another feature in a near future (still experimental). Tsung is able, for instance, to simulate hundreds of users from a single CPU working as clients of a client-server aplication, in order to stress the server with high load and see how it works under such those contidions.
A very interesting issue about Tsung is that it was written using the Erlang language, which was designed for being used on some kind of environments where real-time issues, concurrency, fault tolerance and distributed computing are required features. On this way, Tsung uses the Erlang lightweight processes to simulate each hipothetical user, and that’s why Tsung is able to “create” a so impressive amount of simultaneous users from a single CPU.
Another interesting feature is that, since Erlang was designed for distributed environments, Tsung is designed to take advantage of this when designing the “stressing architecture” for your server: you can have only a client stressing a server, of course, but you also have the chance of having a cluster of Erlang nodes working together for being able to stress even more the “defenceless” server. And that’s the reason I wrote this post: today I was benchmarking an application I started some time ago, and I was really impressed by the way Tsung manages this task… and the ease of getting it working just from downloading the sources from its web site.
Unfortunately, documentation about Tsung it’s not too much (but enough), so might be you spend some time trying to understand how you can configure it, and how to use it… but, when you already know that issues, it’s so easy to use it and so impressive to see the results… especially if you are stressing an application running over the yaws web server, which is also developed using Erlang and is able to work with lots of simultaneous requests, as you can see here.
In conclusion, if you are currently looking for a tool to test your server, I’d suggest you to take a look into the Tsung web site and give it a try… especially if you have several computers connected through a LAN, and you can use them as a “stressing cluster”. I think you’ll like it.
Enjoy it!