-
Notifications
You must be signed in to change notification settings - Fork 210
Conversation
Shared cache is enabled by default and can be disabled with a variable. `install` target is enhanced to obey PREFIX and DESTDIR.
This is an interesting concept. I had thought about extending the session cache to a networked database so that ssl sessions could fail over with the load balancer as necessary. I usually run load balancers in active/backup mode, so I was more interested in using a database with replication (something like tokyo tyrant). In this context, a standard memcached would be a single point of failure. However, tokyo tyrant supports the memcache protocol (with some overheard) so all is not lost. I'll have to test out your memcache extensions in this context. |
You can specify several memcached servers. I suppose they keep themselves in sync. |
So, I've thought about this quite a bit, and how to get around the "session retrieval cannot block" problem... My idea is to use something like redis pub/sub using hiredis.
.. this would create quite a busy gossip channel between N children on M machines--but redis (for example) can push 100k messages a second or so, which is quite a bit of headroom. And it avoids blocking the main thread on a network request. I have an early version of this that isn't quite working yet, but it's the best I've come up with yet. That being said, I'm reluctant to pull in anything that would block stud's I/O thread--that pretty much entirely defeats the execution model. |
If you come up with a working branch, I would be happy to test for performance regression. |
See #50 -- Emeric from Exceliance just tackled this problem in a very direct way. |
Yes, this seems far better. Feel free to close this push request. |
Hi!
Here is a way to share sessions between different hosts using memcached. There are two major drawbacks:
So, this is just a proof of concept.