Perlbal - [PATCH] Ability to choose backend via cookie or hook

This is Interesting: Free IT Magazines  
Home > Archive > Perlbal > May 2007 > [PATCH] Ability to choose backend via cookie or hook





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [PATCH] Ability to choose backend via cookie or hook
André Cruz

2007-05-03, 1:11 pm

Hello.

Using this patch a specific backend from the pool can be specified to
process the arriving client.

Either through a cookie whose name is configured like the high
priority cookie (config var sticky_backend_cookie) or though a hook
(select_backend) we can select a backend using the identifier ip:port.

With this functionality in place we can easily support sticky
sessions, temporary or not, but setting the cookie/using the hook in
other places of the processing as we like.

NOTES:
Using the cookie will expose the IP:PORT of the backend that will be
used (this was not a problem here so I didn't worry about it but I
guess another identifier, opaque to the user, can be used).

If perlbal has problems with a backend it will erase the preferences
of all the clients in the queue which requested this backend. In
practice they will be served by the next backend available.

I submit this patch here in the hope that it will be useful to
someone else (maybe even be included in the svn?) and to hear
comments/suggestions/bugs about it.

Regards,
André Cruz

PS - This patch is against 1.57.



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com