throttle_mod-procs.tcl

This file defines the following Objects and Classes: ::Counter[i], ::Users[i]

Location:
packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl

Procedures in this file

Detailed information

::Counter proc set_in_all_instances (public)

 ::Counter[i] set_in_all_instances var value

A helper function to set in all (direct or indirect) instances an instance variable to the same value. This is used here in combination with changing parameters

Parameters:
var (required)
value (required)

Testcases:
No testcase defined.

::Users proc active (public)

 ::Users[i] active [ -full ]

Return a list of lists containing information about current users. If the switch 'full' is used this list contains these users who have used the server within the monitoring time window (per default: 10 minutes). Otherwise, just a list of requesters (user_ids or peer addresses for unauthenticated requests) is returned. If "-full" is used for each requester the last peer address, the last timestamp, the number of hits, a list of values for the activity calculations and the number of ip-switches the user is returned. The activity calculations are performed on base of an exponential smoothing algorithm which is calculated through an aggregated value, a timestamp (in minutes) and the number of hits in the monitored time window.

Switches:
-full (optional)
Returns:
list with detailed user info

Testcases:
No testcase defined.

::Users proc hits (public)

 ::Users[i] hits uid
Parameters:
uid (required)
request key
Returns:
Number of hits by this user (in time window)

Testcases:
No testcase defined.

::Users proc last_pa (public)

 ::Users[i] last_pa uid
Parameters:
uid (required)
request key
Returns:
last peer address of the specified users

Testcases:
No testcase defined.

::Users proc nr_active (public)

 ::Users[i] nr_active
Returns:
number of active users (in time window)

Testcases:
No testcase defined.

::Users proc nr_authenticated (public)

 ::Users[i] nr_authenticated
Returns:
number of authenticated users (in time window)

Testcases:
No testcase defined.

::Users proc nr_users_time_window (public)

 ::Users[i] nr_users_time_window
Returns:
number of different IP addresses and authenticated users (in time window)

Testcases:
No testcase defined.

::Users proc user_is_active (public)

 ::Users[i] user_is_active uid
Parameters:
uid (required)
Returns:
boolean value whether user is active

Testcases:
No testcase defined.

::throttle Class ::Counter (public)

 ::xotcl::Class Class[i]

Testcases:
No testcase defined.

::throttle Class ::Users (public)

 ::xotcl::Class Class[i]

Testcases:
No testcase defined.

throttle_mod::unmap_pool (private)

 throttle_mod::unmap_pool [ -pool pool ] [ -ms ms ] method url

Function within throttle monitor thread for registering pool unmapping requests after a specified time. This function has to run in this thread to be able to use "::after".

Switches:
-pool (optional, defaults to "slow")
-ms (optional)
Parameters:
method (required)
url (required)

Testcases:
No testcase defined.

xo::pool_remap_watchdog (private)

 xo::pool_remap_watchdog [ -maxWaiting maxWaiting ] \
    [ -maxRunning maxRunning ]

Watchdoc function to ensure liveliness of the server. This watchdog checks every minute the running jobs and maps very slow requests to the slow pool (if configured) to avoid that the default pool is getting filled up with more stuck requests. The watchdog is managed via an ad_schedule_proc started from the init-procs.

Switches:
-maxWaiting (optional, defaults to "10")
-maxRunning (optional, defaults to "100")

Testcases:
No testcase defined.

xo::remap_pool (private)

 xo::remap_pool [ -threshold threshold ] [ -except except ] \
    [ -pool pool ] [ -runtime runtime ] method url

Function for dynamically managing connection pool mappings. When a connection pool "slow", is defined, and the query took longer than "threshold" seconds, and the URL is not 'except' list, then move this request to the "slow" pool.

Switches:
-threshold (optional, defaults to "3.0")
-except (optional, defaults to "/ /dotlrn/ /dotlrn")
-pool (optional, defaults to "slow")
-runtime (optional)
Parameters:
method (required)
url (required)

Testcases:
No testcase defined.

xo::request_monitor_user_info (private)

 xo::request_monitor_user_info key
Parameters:
key (required)

Testcases:
No testcase defined.

xo::unmap_pool (private)

 xo::unmap_pool [ -pool pool ] method url
Switches:
-pool (optional, defaults to "slow")
Parameters:
method (required)
url (required)

Testcases:
No testcase defined.
[ show source ]