Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 Usually, you will set the ping URL to point to a servlet that checks backend database connections and other resources, and only returns “200 OK” if it is able to serve requests successfully – this means that if you have multiple mirrored servers, and one loses the connection to its database, then the other servers will receive all the requests until the connection is up again.

Dispatching to

...

Multiple Applications

It is quite easy to dispatch requests to multiple different applications – the ones defined in the “targetservers” can be considered to be the default application – i.e. if no other defined rules selects another server, then the request will go the server defined in “targetservers”.

...

When using multiple groups of dispatchers, each separate group needs a unique value of “dispatchergroup” configured – this is required so the session controller which controls the frequency of the pings can detect which dispatchers to ask to ping which applications.

How it

...

Works

Periodically (configured by “httpSessionKeepAlivePingInterval” the session controller will enumerate all sessions for identified users owned by itself (in a cluster, each session controller “owns” a portion of the sessions).

...

When a dispatcher next receives a notification that it should ping the application servers on behalf of the identified sessions, it retrieves the previously stored cookies (if present) from the session and “pings” the application server previously assigned to this user by sending an HTTP GET request to it. This causes the application server to reset its idle time and the end result is that as long as a user is active on a single application, all applications HTTP sessions are kept active, thus timeout is shared across all.

How to

...

Enable it

  1. Configure “cookiesToHideFromBrowser” with the names of the session cookies you wish PortalProtect to catch.
  2. Make sure that “dispatchergroup” property is set to a value unique for each group of dispatchers if you have more than one group.
  3. Set “saveSelectedServerInSession” property to true on dispatchers, or the information needed by the session controller will not be available.
  4. Configure “httpSessionKeepAlivePingInterval” for the session controller and set it to the number of seconds between each “ping”. You should use a value lower than the http session timeout, but keep it relatively high to keep traffic low. E.g. if the http session timeout is 20 minutes, set this to 900 seconds = 15 minutes.
  5. If you do not wish to use the URL configured in “pingurl” but require a separate url for this, you need to configured it in the “httpsessionkeepalivepingurl” property.

...