Generate load for the mod_cluster demo application
Load Generation Scenarios You can use the application's GUI to instruct individual servers to artificially generate various types of load, and then track how that load affects request and session balancing. Load generation is controlled via the application's "Server Load Control" tab. The panel includes the following options: Target Hostname and Target Port: The hostname or IP address of the server on which you want load generated. There are two strategies for setting these: You can use the hostname and port of the load balancer, in which case the load balancer will pick a backend server and route the request to it. Note the client application does not maintain a session cookie for these requests, so if you invoke another server load generation request, you shouldn't expect the same server to handle it. If the JBoss AS/JBossWeb/Tomcat servers are running the HttpConnector as well as the AJP connector, you can specify the address and port on which a particular server's HttpConnector is listening. The standard port is 8080. Load Creation Action: Specifies the type of load the target server should generate. See below for details on the available load types. Params: Zero or more parameters to pass to the specified load creation servlet. For example, in the screenshot above, Number of Connections and Duration. How many parameters are displayed, their name and their meaning depend on the selected Load Creation Action. The label for each parameter includes a tooltip that explains its use. The available Load Creation Actions are as follows: Active Sessions Generates server load by causing session creation on the target server. Datasource Use Generates server load by taking connections from the java:DefaultDS datasource for a period Connection Pool Use Generates server load by tieing up threads in the webserver connections pool for a period Heap Memory Pool Use Generates server load by filling 50% of free heap memory for a period CPU Use Generates server CPU load by initiating a tight loop in a thread Server Receive Traffic Generates server traffic receipt load by POSTing a large byte array to the server once per second for a period Server Send Traffic Generates server traffic send load by making a request once per second to which the server responds with a large byte array Request Count Generates server load by making numerous requests, increasing the request count on the target server [1] The demo's "Datasource Use" load generation scenario requires the use of JBoss Application Server. [2] For purposes of this chart, a session is considered "active" if a client thread will ever again send a request associated with the session. When client threads stop using a session, they can either send a request to invalidate it or just abandon it by no longer including its session cookie in requests. After a session is abandoned, it will not be reflected in the "Session Balancing" chart, but it will continue to exist on the JBossWeb/Tomcat/JBoss AS server until it is removed due to timeout. [3] The default value for this field is controlled by the mod_cluster.proxy.host system property, or localhost if not set. Editing the run-demo.sh or run-demo.bat file to change the -Dmod_cluster.proxy.host=localhost passed to java will allow you to avoid re-typing this value every time you launch the demo application. [4] The default value for this field is controlled by the mod_cluster.proxy.port system property, or 8000 if not set. Editing the run-demo.sh or run-demo.bat file to change the -Dmod_cluster.proxy.port=8000 passed to java will allow you to avoid re-typing this value every time you launch the demo application.