/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-12 / Cookie session tracking in 2.0b4

[ << ] [ >> ]

[ Pounds with multiple https servers / "Gerard ... ] [ LogLevel 4 in 2.0b4 / Ryan Nielsen ... ]

Cookie session tracking in 2.0b4
Ryan Nielsen <ran(at)setq.net>
2005-12-21 04:36:45 [ FULL ]
Hello

When a request comes without a cookie of matching ID, Pound drops the 
request complaining that a backend cannot be found.
New sessions cannot be created!

Is there a way to tell Pound what to do when the cookie is missing?

In any case, with the following patch everything is working nicely here.
It changes get_backend to act like the service session type is NONE, 
choosing a backend at random, when the cookie is missing.

Thanks

--- orig-Pound/Pound-2.0b4/svc.c        2005-12-07 18:57:59.000000000 +0900
+++ Pound-2.0b4/svc.c   2005-12-21 12:15:01.134382584 +0900
(at)(at) -605,6 +605,8 (at)(at)
                 svc->sessions = sess_add(svc->sessions, key, res);
             } else
                 res = sp->to_host;
+        } else {
+            res = rand_backend(svc->backends, random() % svc->tot_pri);
         }
         break;
     }

Re: [Pound Mailing List] Cookie session tracking in 2.0b4
Robert Segall <roseg(at)apsis.ch>
2005-12-21 12:59:06 [ FULL ]
On Wed, 2005-12-21 at 12:36 +0900, Ryan Nielsen wrote:[...]

Many thanks Ryan. Your patch is correct and will appear in the next
release.

The situation you describe is VERY common! In (almost) all cases the
session cookie will be set by the back-end, and thus appear first in the
response rather than the request.[...]

MailBoxer