plainblack.com
Username Password
search
Bookmark and Share

    

Users without Sessions -- Performance and Caching improvements

User preaction
Date 3/28/2011 1:26 am
Views 523
Rating -1    Rate [
|
]
Previous · Next
User Message
preaction

Every visitor that visits a WebGUI site is assigned a session ID. This tracks their usage of the site, allows them to customize things without logging in, and keeps track of what user account they've logged in to.

The most important bits are the session scratch and the userId. Without these, WebGUI would not be as we know it. These are the required functionality of a user session.

Less important is the "Last Page Viewed" or "User IP". These are easily figured out from any log analysis software, and more.

So, unless a user has set a scratch variable, or has logged in, there is no reason for them to have a session ID.

If they do not have a session ID, we have an excellent marker for caching proxies like nginx. We can improve performance for the Visitor user by making ALL requests bypass the mod_perl server.

Moreover, by removing last IP and last page viewed from the session, we remove the database writes needed to keep those current.

My question then is:

Does anyone absolutely need Last IP and Last Page Viewed to be tied to Session? Does anyone absolutely need every user to have a sessionId no matter what?

If so, I can make the old behavior an option (you can turn it on, it will be off by default).



Back to Top
Rate [
|
]
 
 
knowmad

Doug,

This sounds like a great idea for improving performance. Not knowing the immediate impact that turning these off will have to our existing sites, I'd be more inclined to supporting the ability to turn it on in case we find that we're using these features.

 

William

----
Knowmad Technologies
http://www.knowmad.com



Back to Top
Rate [
|
]
 
 
perlDreamer

The User's IP address is used all over WebGUI.  Here's a short list returned by

ack getIp
ack lastIp

  1. Group's that use IP addresses to include users in groups.
  2. Posts and Posts block repeated ratings from the same IP.
  3. Subnet checks are done for Turn On Admin, Spectre, Showing Debug.

Now, 2 and 3 can pull the IP address directly from the request, so that's probably not a big deal, so that just leaves how to pull lists of users who are in IP groups.  And that can be an enablable feature.

 



Back to Top
Rate [
|
]
 
 
preaction

  1. Group's that use IP addresses to include users in groups.

That would actually defeat the caching: it's dynamic content that is not tied to session. So that'd have to be enabled in the config file too.

But, we can detect if any IP groups are being used and update the config accordingly in an upgrade.

Enabling universal sessions would enable IP-based groups.



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved