sticky session using load balancer

Peter Schober peter.schober at
Thu Dec 17 04:52:51 EST 2015

* nr673 . < at> [2015-12-17 01:54]:
> As mentioned in the following documentation, I enabled the session
> stickyness for 2 mins in the load balancer.
> shibboleth2.xml does not declare any StorageService element. By default,
> Shibboleth would use the memory storage service. I could login into my
> application successfully. After 3 or 4 minutes idleness, Shibboleth looses
> the session and redirects me to the application welcome page.

It's not Shibboleth losing the session, it's the loadbalancer losing
stickiness (as configured) and routing the request to a web server
that does not have the same Shibbleth session in memory as the one
that created it initially.

> Is the clustering possible just by enabling the session stickyness
> in load balancer?


With permanent stickiness you could make something like that work,
until one of the 4 machines goes down, then everyone having a session
on that SP would have to log in again.
Many would still find that a workable compromise, I suppose.

> Or do I need to use shared process or shared database approach?

Yes (modulo the compromise mentioned above). If you can't make sure
requests will always end up on the same server then you need to make
sessions available to all the servers where requests might end up.
I.e., you can't keep them in memory on one server and expect things to
magically work if you route requests to another server.

More information about the users mailing list