Hi

I'm doing some tests with apache+mod_wsgi. The idea is to share sessions 
between two web servers.
I've stored sessions in an external server (using DB and memcache), both of 
them wotk fine but I find that sessions stored in memcached are deleted in 
five minutes. Capturing web2py-memcache tcp dialog, I see that web2py 
stores the session key with a deletion time of 300 seconds. Can I change 
this value from my model/controller ? something like session.timeout?

The next configuration I'd like to try is haproxy as http load balancer 
with sticky sessions (stored locally in each server), the idea is to always 
have the site available.
I've noticed that some changes, for example apache config o web2py routes, 
require a restart of the http service because a reload doesn't work. Apache 
will be down for a few seconds untill it restarts, and I think haproxy will 
follow requests to the other server, losing the session.

To avoid a single point of failure I'm thinking about:
- 2 haproxy servers
- N apache web servers with web2py (N >= 2)
- external sql/memcache to store sessions, with some kind of redundancy. 
The data to be accessed are legacy databases and webservices, I can't 
change anything there.

What do you think about this configuration? Any other ideas?

Reply via email to