Sharing caches and sessions between multiple Pylons instances

2008-05-23 Thread L.C. Rees

In a scenario where you're running multiple Pylons instances of the
same Pylons application behind a load balancer, what techniques can
you use to share Beaker sessions and caches between the instances so
the data they're storing can be accessed when needed irrespective of
which instance is handling an individual request?-lcr

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: Sharing caches and sessions between multiple Pylons instances

2008-05-23 Thread Philip Jenvey


On May 23, 2008, at 2:06 PM, L.C. Rees wrote:


 In a scenario where you're running multiple Pylons instances of the
 same Pylons application behind a load balancer, what techniques can
 you use to share Beaker sessions and caches between the instances so
 the data they're storing can be accessed when needed irrespective of
 which instance is handling an individual request?-lcr

Beaker can use SQLAlchemy or memcached as its backends.

Unfortunately we don't have a tutorial on how to set this up. Someone  
wrote a good little intro that covers the Beaker backends here  
(unfortunately he never migrated this over to the Beaker section on  
the wiki):

http://www.openvest.com/trac/wiki/BeakerCache

It only covers just the Beaker API though, it doesn't cover how you'd  
utilize these backends within Pylons. I think the key thing you need  
to know is that you can set Beaker options (like the 'type' option) in  
the app section of your ini file. e.g.:

beaker.type = 'memcached:stuff':

Those options are covered here:

http://wiki.pylonshq.com/display/beaker/Configuration+Options

The @beaker_cache decorator can also take a type argument.

--
Philip Jenvey



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---