FWIW i'm not sure if this applies to your code or not, but a few things to 
look out for in writing server-side libraries in pyramid:

1. make sure you're only 'writing' the session once (a few libraries had 
written on each change)
2. a few libraries have done a preliminary check to see if a session 
exists. it's best to just "load", and create a new session on a load 
exception
3. it's also best to only write/create a session if you have data to store 
(or edit).  a handful of libraries will create a session by simply 
accessing/inspecting the `request.session` property.  
4. i found it useful to fingerprint a serialized version of the session, 
and detect changes on nested data by that. that overhead was much smaller 
than the load on Redis to store sessions that didn't really change.

i've had problems in the past with spiders/bots nearly taking a site 
offline from the effect of 100k+ hits in the span of a few minutes... each 
one generating a new session.



-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/f07b7211-d7f8-4bcb-b727-df4d0dec71c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to