Index: load-monitors.html =================================================================== --- load-monitors.html (revision 3767) +++ load-monitors.html (working copy) @@ -11,11 +11,29 @@

DWR comes packaged with different server load monitors which help balance server load between multiple users. The type of monitor chosen will depend on your application's need.

+

Default Server Load Monitor

+

Used by the DWR core if no other load monitor is specified. This monitor allows users to maintain a connection for up to 60 seconds before having to re-establish a it.

+ +

Small Site Server Load Monitor

+

Assumes a small server load and allows clients to maintain a connection with the server for up to 30 minutes. When a connection is cycled no mandatory time is required before a connection can be re-established.

+

Setup web.xml parameter

+
+<param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>
+<param-value>org.directwebremoting.impl.SmallSiteServerLoadMonitor</param-value>
+
+ + +

Throttling Server Load Monitor

-

The Throttling Server Load Monitor at its basic level works by controlling the maximum number of currently connected threads and the maximum hits per second to the server. To control load this load monitor will adjust the time a connection is allowed to stay connected, and the time that the reverse ajax api will wait before connecting to the server again. By adjusting the connected time and the disconnected time the Thottling Server Load Monitor can help give users a better overall experience during times of heavy load.

+

Controls the maximum number of currently connected threads and the maximum hits per second to the server. To control load this load monitor will adjust the time a connection is allowed to stay connected, and the time that the reverse ajax api will wait before connecting to the server again. By adjusting the connected time and the disconnected time the Thottling Server Load Monitor can help give users a better overall experience during times of heavy load.

-

Since it is inefficient to check load everytime a client requests a new connection, this server monitor runs a separate load management thread that will run at most once every 5 seconds while there are incoming connections. When no more incoming connections are being received the load monitor will simply shutdown and sleep until a new connection is requested. Note that the thread will verify load at least once per hour even if no connections are being received.

+

Setup web.xml parameter

+
+<param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>
+<param-value>org.directwebremoting.impl.ThrottlingServerLoadMonitor</param-value>
+
+

When the server is throttling connections there are three possible modes that the server could be in.

  1. Low Usage @@ -36,10 +54,10 @@
-

Setup

+

Setup

    -
  1. Include an init parameter to the DWRServlet. +
  2. Include an init parameter to the DWRServlet with the {Class Name} of the monitor you would like to utilize.
     <servlet>
       <servlet-name>dwr-invoker</servlet-name>
    @@ -53,13 +71,13 @@
         <init-param>
     
         <param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>
    -    <param-value>org.directwebremoting.impl.ThrottlingServerLoadMonitor</param-value>
    +    <param-value>org.directwebremoting.impl.{Class Name}</param-value>
       </init-param>
     </servlet>
     
  3. -

    At this point DWR will now use the ThrottlingServerLoadMonitor to balance reverse ajax connections.

    +

    At this point DWR will now use the selected monitor to balance reverse ajax connections.