[PATCH] Ability to choose backend via cookie or hook
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Perlbal > [PATCH] Ability to choose backend via cookie or hook




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-03-07 06: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.








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:27 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register