Which hooks to use in perlbal?

Elliot F elliotf-danga-perlbal at gratuitous.net
Tue May 30 21:18:19 UTC 2006


If sensible hooks were added, would they be accepted upstream, or is the 
goal of perlbal to remain (primarily) a load balancer?  I'm 
assuming/hoping they would, since the 'proxy_read_accept' hook was a 
recent addition.  Worst case scenario is registering the same subref 
against multiple hooks.

Brad Fitzpatrick wrote:
> Unfortunately, perlbal doesn't really have great hooks for this sort of
> use.
> 
> - Brad
> 
> On Mon, 29 May 2006, Elliot F wrote:
> 
> 
>>Hello all,
>>
>>I could use a nudge in the right direction in regards to a perlbal
>>plugin I'm writing.  I am attempting to use perlbal as a general-purpose
>>application web server, in lieu of using apache+mod_perl.
>>
>>The problem is that I don't know what hook I should use when writing my
>>plugin.  I need to have access POST data, but it seems the only time a
>>plugin can have access to any POST data is when 'proxy_read_request' is
>>used, but the 'proxy_read_request' isn't called when there is no POST
>>data.  Or am I crazy?
>>
>>Summary of my problem:
>>When hooked against start_proxy_request, $obj->{read_buf} is empty
>>When hooked against proxy_read_request, $obj->{read_buf} is not empty,
>>but if there is no data POSTed, proxy_read_request is not triggered.
>>
>>Should I make a subref and register the same subref with multiple hooks
>>(if I want to catch both POST and non-post traffic)?  Or is there some
>>amazingly simple thing that I'm overlooking?
>>
>>Thanks,
>>
>>Elliot
>>
>>


More information about the perlbal mailing list