Using Erlang as a web stress tool

Shawn Pearce <>
Fri Jun 15 23:33:44 CEST 2001


I'm considering building a web application testing tool using Erlang.
What I am thinking is, modeling each simulated user as a Erlang
process, and each browser connection as a Erlang process.  Thus for
400 simulated users simulating Netscape we have 2000 processes.  (4
browser connections per user.)

Now since I have a quad CPU machine, I would most likely split these
evenly into 4 nodes, leaving 500 processes per node.  Most likely easy
work for Erlang.

The question is, could a single Erlang node handle 400 concurrent
TCP/IP connections to the server(s) being tested?  Does anyone think
that I'm better off doing this in C/C++ where I have direct access to
poll (and friends)?

And the second question is, if I'm in Erlang, will using binaries slow
me down due to the shear number of binaries being created and released
from network traffic?  I realize all of the binaries reside in the same
memory heap, and aside from passing the data from the network socket to
the browser connection process, the data won't get moved around
anywhere.

We're talking doing 100-200 HTTP requests per second by each node
(making 400-800 total for the machine).  Some of those requests will 
be able to recycle the TCP stream via HTTP KeepAlive, others won't.  But
at least 100 new TCP streams will be created (and closed) per second.

BTW, the Erlang nodes are most likely to run on a Windows NT 4.0 Server
system, in case that makes any difference.

Just thought I'd ask.  :-)

--
Shawn.

  ``If this had been a real
    life, you would have
    received instructions
    on where to go and what
    to do.''



More information about the erlang-questions mailing list