Menu
   Open: Dynamic Sites  
   Read: Static Sites  
   ▶ Sessions  

Sessions: Management of Surfer Session Data

WebHub's architecture includes a session object, in which details about the site visitor are kept. Those details may include data entered on forms, information sent by the browser such as user agent name and various headers, page usage counts, and so on.

The Hub assigns each visitor a unique session number, and that session number is visible in the URL and/or in a cookie. Uniqueness is enforced relative to a time period which is set by the administrator, defaulting to 24 hours and often shortened to 30 minutes. Within that time period, each new visitor is given a unique number. The administrator also sets the number of digits in the session number (between 4 and 10, inclusive), and this factors into the size of the pool of session numbers. A higher number of digits gives more unique numbers.

The session data is stored in memory in an object named "Session" plus the session number, such as "Session12345". This data is streamed to disk using Delphi's component-write streaming, which is highly optimized. The programmer decides how many session objects to retain in memory at any one point in time. The default is 300.

When there are multiple instances of a WebHub application running, and visitors are not being routed to the same instance each time (i.e. the cgiUseHandle property is false), the session data can be shared across those instances because each loads the data from disk as needed. This type of sharing is enabled by setting two properties, ShareByFile and ShareSessions, both to true.

There is some disk i/o and other overhead in creating a new session, relative to reusing an existing one. Therefore when stress testing WebHub systems, it is important to consciously test (a) all new, (b) all active, or (c) a mixture of active and new session numbers.

Running: WebHub-v3.287 compiled with d29_win64 on Microsoft-IIS/10.0,
Sat, 20 Apr 2024 07:11:19 UTC
Session 646312950, 0 pages sent to Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) at 3.12.41.106;
Time to produce this page: 0msec.