14, February 1998
In the tradition founded by the ancient philosopher, Socrates is a tool that allows you to learn by asking questions.
This application is a tool for testing the performance of your web site, CGI's, plug-in's, or server side DLL's under a heavy load.
Socrates allows you to simulate many virtual web clients from one machine.
You can configure what files to request, what kind of delays, and how many times to make requests in order to simulate a diverse set of load conditions. It is possible to make these test repeatable, try that with several friends or coworkers all pounding your site on your command!
This application provides an easy way to test your web site.
Socrates can also be configured to watch your web server and beep if the web site stops responding.
Socrates provides a minimal level of cookie support. Each virtual client can store and send one cookie. Once a cookie has been set for a virtual client, it will be sent for every subsequent request.
Socrates is not meant to be used for generating comparative benchmarks between different web servers. There are tools available that provide a standard set of documents and a rigorous set of testing criteria such as:
Software QA/Test Resource Center | http://www.charm.net/~dmg/qatest/qatweb1.html |
---|---|
WebBench | http://www.zdnet.com/zdbop/webbench/webbench.html |
WebStone | http://www.mindcraft.com/webstone/ |
Mercury Astra TestSite | http://www.merc-int.com/products/astraguide.html |
Others?? | Send me e-mail and I'll update this doc |
Socrates is not meant to used as a weapon. See Net Etiquette below.
Socrates will not automatically find and test all of the links in your site. Perhaps in another version if the clamoring of the masses is sufficient.
Socrates is configured through a configuration file. The default configuration file name is socrates.conf. This file is composed of multiple lines, each containing a [tag] [value] pair. These pairs must be separated by a tab or space. Capitalization is not important. A final blank line IS required as the last line in the configuration file.
The possible configuration file entries are:
Tag | Value | Example |
---|---|---|
key | This is the key that I send you to get rid of the nag dialog. You must send me a real, live picture Post Card with your e-mail address. | |
host | This is the host that you want to test. It can be an IP address or a host name. If your DNS can recognize it, then it is valid. Do not provide the protocol portion of the URL (i.e. http://) | localhost www.morphtech.com 206.239.78.10 |
proxy | This is the name of a proxy server, if you must communicate through one. It can be an IP address or a host name. If your DNS can recognize it, then it is valid. | proxyhost proxy.morphtech.com 206.239.78.10 |
port | This is the port that the server is listening on. The standard HTTP port is 80. | 80 8080 |
secport | This is the port that the server is listening on for SSL connections. The standard HTTPS port is 443. | 443 |
secureCheck | This settting is used to force Socrates to use a secure connection when checking for the socrates.txt file. The default value is 0. | 1 - Force a secure check 0 - Use standard HTTP |
clients | This is the number of clients to simulate. | 1 10 |
delay | This is how many milliseconds to delay between staring each clients. | 300 10 |
pause | This is how many milliseconds each client waits after a connection before attempting another. | 200 10 |
lurk | A value of 1 means Socrates will run in LURK mode. The default value is 0. | 0 1 |
username | The username to use for ALL page requests. Only Basic Authentification is supported. | foo |
password | The password to use for ALL page requests. Only Basic Authentification is supported. | bar |
iterations | This is how many connections each client will make. A value of 0 means each client will loop until told to stop. | 0 30 1000 |
order | A value of 0 means each client will connect to each page in sequential order. A value of 1 means that each client will randomly choose a page for each connection. | 0 1 |
ParseRequest | A value of 1 means for each request sent by a virtual client, the URL, POST, and GET argument will be parsed and any special markers will be expanded into dynamic data. See the Request Parsing section below for more information. | 0 1 |
EnableCookie | A value of 1 means each client will store and send a single cookie that is set by the web server that is being queried. | 0 1 |
get | This entry identifies a page that you want to request using the GET method. You can have as many of these lines as you need. The leading slash is important. Do not include the protocol or host portion of a URL (i.e. http://www.foobar.com) The entry may optionally be followed by a DataStart/DataEnd pair. | / /home.html /products/cool/socrates.html /socrates.txt |
sget | This entry identifies a page that you want to request using the GET method via SSL. You can have as many of these lines as you need. The leading slash is important. Do not include the protocol or host portion of a URL (i.e. http://www.foobar.com) The entry may optionally be followed by a DataStart/DataEnd pair. | / /home.html /products/cool/socrates.html /socrates.txt |
post | This entry identifies a page that you want to request usong the POST method. You can have as many of these lines as you need. The leading slash is important. Do not include the protocol or host portion of a URL (i.e. http://www.foobar.com) The entry must be followed by a DataStart/DataEnd pair. | / /foo.cgi /products/cool/doit.morph /process.pl |
spost | This entry identifies a page that you want to request using the POST method via SSL. You can have as many of these lines as you need. The leading slash is important. Do not include the protocol or host portion of a URL (i.e. http://www.foobar.com) The entry must be followed by a DataStart/DataEnd pair. | / /foo.cgi /products/cool/doit.morph /process.pl |
dataStart | This entry identifies the start of a data section. See the DATA section for a description of how to specify extra data for GET and POST requests. | dataStart name value dataEnd |
dataEnd | This entry identifies the end of a data section. See the DATA section for a description of how to specify extra data for GET and POST requests. | dataStart name value dataEnd |
# | Any line beginning with a # is ignored | # |
For Example:
Get /test.morph dataStart foo bar baz bad dataEndThis will generate a GET request that looks like this:
http://www.myserver.com/test.morph?foo=bar&baz=badThis configuration example:
Post /test.morph dataStart foo bar baz bad dataEndWill send the submit a request to the webserver as if the following HTML had been used:
<FORM METHOD="post" ACTION="test.morph"> <INPUT NAME="foo" VALUE="bar"> <INPUT NAME="baz" VALUE="bad"> <INPUT TYPE="submit"> </FORM>In this configuration example:
Get /test.html Post /test.morph dataStart foo bar baz bad dataEndThe GET request for test.html will not send any search arguments. The POST requst for test.morph will send extra data.
Tag | Description | Example |
---|---|---|
~id~ | This tag will be replaced with the virtual client ID. This is a 0 based integer. | /foo.cgi?trackid=~id~ /foo.cgi?trackid=0 /foo.cgi?trackid=1 |
Get /test.morph dataStart theid trackid~id~ dataEndThis will generate a GET request that looks like this:
http://www.myserver.com/test.morph?theid=trackid0 for the first virtual client http://www.myserver.com/test.morph?theid=trackid1 for the second virtual client
2xx | Successful |
---|---|
3xx | Redirection |
4xx | Client Error |
5xx | Server Error |
Dropped | No response after initial connection |
The other fields keep some statistics on the overall performance of the server.
Connections | How many connections have been made or attempted |
---|---|
Elapsed Time | How may seconds has Socrates been querying the server |
Connections/Sec | How many connections per second is the server providing. This value is calculated based upon the last 100 connections. |
Avg. Latency | How many seconds does it take for the server to send back the first piece of data in response to a request. This is how long you must wait before your browser can begin to render the requested page. This value is a sliding average over the last 100 connections. |
Avg. Transfer | How many seconds does it take for the server to send the rest of the data. This is how long you must wait for the page to be completely transferred after the initial data has been sent. This value is a sliding average over the last 100 connections. |
Total KBytes | The sum total of all the data sent by the server. This value includes the HTTP headers. |
All of the statistics reset after Socrates has been stopped.
The graphical display provides a real time display of the status of each virtual client. The dots and lines have the following meaning:
Light green dot | These dots, arranged around the circumference of the circle are the clients. |
---|---|
Blue dot | This dot, located at the hub of the circle is the server. |
Red spoke | A red line between a client and the server indicates a failed connection (5xx or dropped). |
Yellow spoke | A yellow line between a client and the server indicates a connection is being created. |
Green spoke | A green line between a client and the server indicates the client is connected and waiting for data. |
If the server fails to allow a connection or return a valid reponse (codes 200-400) then Socrates will start beeping. Socrates will, however, continue to query the server. If the server returns a valid response, then Socrates will shut-up.
Being benevolent web beings, we have not given Socrates this power. Before a site can be queried by Socrates, a file named socrates.txt must exist in the root document directory.
Socrates also leaves tell tale tracks. Each request contains this User-Agent header entity: Socrates (Web Site Stress Tool)
Morph Technologies 1919 Gallows Road, 10th Floor Vienna, VA 22812 USA
This program is distributed as a service of it's Author Mike Pav. I make no warranties about this software, and it is distributed "as is".
Current versions of Socrates can be found on the Morph Technologies web site at http://www.morphtech.com.
Questions, comments, suggestions, and even bug reports are always welcome. Send them to mpav@morphtech.com.
Socrates was an ancient Greek philosopher that said "The unexamined life is not worth living". He taught by the Socratic method; skillfully posed questions are a better teaching tool than just stating the facts. He believed that through careful introspection, life can be lived to the fullest. We believe the same to be true of the web!
DynaMorph allows people creating Web pages to embed into their HTML documents very powerful programmatic constructs which would otherwise require an external CGI. DynaMorph keeps HTML layout and CGI-type specialization in a single document. This enables users who build interactive web sites to operate within a single paradigm. Unlike other products on the market like Cold-Fusion, WebSiphon, and NetCloak, DynaMorph uses a powerful separation between the constructs of web-site templating which are static and those which are dynamic. This allows DynaMorph to cache and serve dynamic documents very quickly while still providing access to the powerful server-side include structures which greatly eases the site creation process. While the DynaMorph language provides a high level of expressiveness for professional programmers, it also has quite a number of easy to use, pre-built features which will make it immediately useful to non-programmers.
DynaMorph is currently supported on Mac, Windows NT, Windows 95, and Linux. This is great for Web development companies that like to do their graphic and site development work on their Macintoshes (without excluding PC Users), yet have a requirement to deliver their work to clients running on NT or UNIX platforms. With an interactive site built using DynaMorph, developers and designers can literally pick-up their DynaMorph site hosted on a Mac, plop it onto an NT box and....It will just work!
Copyright © 1996-1998 Mike Pav