Possible via a Perlbal plugin?
brad at danga.com
Wed Apr 18 14:44:04 UTC 2007
The first step should be no problem.
The second, however, isn't currently implemented (sticky sessions), but a
related feature (hashing a request URL onto a specific backend) is being
requested lately by my employer. (thus sticky sessions is likely to be
implemented as well, since it basically comes for free)
Bot both uri hashing and sticky sessions come down to the basic problem
of: what to do in subsequent requests when that old node is out of the
pool or down? What are all the tunables for this policy/timeouts/etc?
And in your case, how do requests waiting for a specific backend compete
for requests waiting for any backend? Imagine 3*(n+1) queues, n per
backend (high+normal+low priorities), then then high+normal+low priorities
for ANY backend.
If more of these questions were answered, implementation would probably
happen sooner, but so far it's been kinda a low priority both at work and
in the community, as the typical answer is "stickiness implies your webapp
is broken!". (which you clarified isn't under your control....)
On Wed, 18 Apr 2007, André Cruz wrote:
> I'm an happy Perlbal user so I'll start by congratulating the
> development team. :)
> I need a certain functionality and I would like to know if it's
> possible to do this via a plugin (if all the hooks I need are in
> place). I need to check the backend response to each request. If the
> response is a redirect to a specific URL I need to set a cookie to
> establish a temporary sticky session so that for the next X mins the
> requests from this client will end up on the same backend that issued
> the redirect.
> The application on the backend is not under my control, btw, I just
> need to satisfy it's requirements and I would like to continue to use
> So there are two parts this:
> 1- Check the response and set the cookie if needed.
> 2- Check the request for the cookie and send it to the requested
> backend if it is set.
> Is this doable?
> Thanks and keep up the good work. :)
> André Cruz
More information about the perlbal