Announce: perlbal-1.2
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Perlbal > Announce: perlbal-1.2




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

    Announce: perlbal-1.2  
Brad Fitzpatrick


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


 
03-07-05 11:47 PM

Hello!

New release of Perlbal.  (shit, it's been like 5 months!)

We've been busy, though.  Changelog below.

Required:

http://www.danga.com/dist/Danga-Soc...ket-1.38.tar.gz
http://www.danga.com/dist/Perlbal/Perlbal-1.2.tar.gz

Optional:

This provides a fast implementation of header parsing which is the
main CPU hog in Perlbal.

http://www.danga.com/dist/Perlbal/P...ers-0.15.tar.gz

To enable it, on the management port, or in your config file:

xs enable headers

You can turn it on/off at runtime to compare CPU usage.

Credits:

Mark Smith <junior@danga.com> is the main hacker on Perlbal nowadays,
and he's solely responsible for the new XS Header parsing code.  I'm
mostly the suit (well, t-shirt) that tells him what to do.

Changelog since 1.0.1:

-- add new stats command 'nodes' that shows information on each node that we
've
been connecting to -- last connect time, last attempt time, a breakdown of
the last 500 status codes returned, etc

-- add ability to use new Danga::Socket profiling; 'profile on', 'profile da
ta'
to see the info so far, and 'profile off' to disable it

-- graceful shutdown now flags sockets that are busy to die so they die when
they're done with their current connection

-- sockets in persist_wait now get closed immediately during a graceful shut
down

-- fix handling of OPTIONS responses; used to do its own state clearing but
it now uses the next_request method as it should

-- fix bug with determination of keep-alive in http 1.1 case specifying
a connection: close header

-- added 'uptime' management command to track how long Perlbal has been up

-- new config commands: HEADER INSERT <svc> <header>: <value> and HEADER
REMOVE <svc> <header> which will insert and remove headers from user
requests before they're sent to backend proxy nodes.

-- add dependency to Net::Netmask; now you can specify trusted_upstream_prox
ies
on a service (SET service.trusted_upstream_proxies = 10.0.0.0/8, etc)
which will allow requests from that range to set X-Forwarded-For, X-Host,
and X-Forwarded-Host headers.

-- fixed a bug that caused connections to hang when the backend responded
before the user was done sending data

-- reset some variables that weren't being reset: read_buf, read_ahead, read
_size

-- "proc" management command shows user and system CPU usage for Perlbal
this run, as well as a delta since the last time you ran "proc"

-- added Perlbal::XS interface for modules to use; also 'xs' management
command to see the status of XS modules

-- bug in PalImg caused crash on files with no length (or when another
error occurs that causes no data to be sent to new_gif_palette function)

-- ReproxyManager would sometimes let closed backends back into the pool
and hand them off to clients, fixed to check for that

-- new policy: you don't muck around with the internals of other classes.
notably, clients don't change the internals of a backend and backends
don't change the internals of a client.  this was causing all sorts of
problems because nobody was cleaning up properly.  (especially with regard
to "who is my backend's client" type questions.)

-- fixed up code that did its own keep-alive checks to use the HTTPHeaders
functions so that in the future every part of the code stays up to date

-- Perlbal::Socket now has the option to keep track of all objects that
are created.  new command to management interface 'leaks' will show
all objects currently in memory.  turn this functionality on by enabling
the TRACK_OBJECTS constant in Perlbal::Socket.

-- split keep-alive logic into request and response methods and cleared
up how that works

-- rewrote reproxy URI support.  new class Perlbal::ReproxyManager does all
of the work relating to reproxies.  it's basically a service class but
stripped down and dealing with single endpoints instead of pools.  much
much much more robust under heavy load.  (Junior, Brad)

-- now that we support persistent connections, the 'queues' command didn't
have an accurate time; added ClientProxy member last_request_time so
we can accurately tell how long requests have been waiting for

-- Danga::Socket got an overhaul; close and steal_socket now share a lot
of code by calling _cleanup.  some more paranoia on making sure the
object isn't already closed when we try to do things.

-- lots more paranoia in close events and event_err handling for backends

-- added tracking mode for helping look for leaked objects; records a
backtrace of every object created.  "server track_obj = 0/1" to enable
or disable it, and then "tracking" in a management interface to see.

-- made Perlbal::objctor/objdtor take an object as their first parameter.
much faster than using caller().

-- fix Highpri plugin to not check hosts for high priority values when
the host isn't defined

-- made Palimg plugin far more paranoid about errors, and also uses new
ClientHTTPBase scratch area for keeping track of data instead of using
headers (which are generally slower)

-- fixed bug in HTTPHeaders that set_version would inadvertently
run into when used on a header created through new_response

-- ClientProxy class now supports persistence; set persist_client on
the proxy service in order to enable it.

-- Palimg plugin now supports fallback to web server mode if the
requested URI doesn't fit our desired pattern

-- did some cleanup; made a bunch of HTTPHeaders accesses use the
accessor methods instead of referencing into the object's private
store of data

-- fixed a crash caused by calling getsockname/getpeername on sockets
that have been undefined after having been stolen during an internal
redirect to another webserver

-- fixed _simple_response to not return a body if we're serving
to a HEAD request

-- bug fix: don't send Not-Modified responses to requests for dynamic
directory listings.  it was messing up persistent connections
since the directory serving code didn't get passed down whether we
were sending a body or not.  and not modifies on directories are hard:
modify time isn't altogether useful.  (file sizes could change)

this still does not-modifieds on indirect index.html directory
requests, because _serve_request ends up eventually calling
_serve_request on a different URI.  (brad)

-- added BSD::Resource as dependency to Makefile.PL (brad)

-- fixed 304 Not Modified responses to not send Content-Length
and Content-Type headers.  (jr)


- Brad







[ Post a follow-up to this message ]



    Re: Announce: perlbal-1.2  
Brad Fitzpatrick


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


 
03-08-05 01:06 AM

Weird... thanks!  what client sends that?

I've /never/ seen that on LiveJournal, and I'd expect us to get every
browser, eventually.

We can fix, though.

- Brad


On Tue, 8 Mar 2005, Russ Garrett wrote:

> Nice, just put it live (with the usual absolutely no testing), and it
> seems to be working a treat. One thing I have noticed however, is that
> we're getting a few of these (about 1 per second):
>
> @40000000422d078931385d5c Argument "156;charset=utf-8" isn't numeric in
> addition (+) at /usr/local/lib/perl/5.8.4/Perlbal/XS/HTTPHeaders.pm line 9
8.
> @40000000422d078b068f5fec Argument "156;charset=utf-8" isn't numeric in
> addition (+) at /usr/local/lib/perl/5.8.4/Perlbal/XS/HTTPHeaders.pm line 9
8.
> @40000000422d078e2682e8dc Argument "156;charset=utf-8" isn't numeric in
> addition (+) at /usr/local/lib/perl/5.8.4/Perlbal/XS/HTTPHeaders.pm line 9
8.
> @40000000422d078f3aa1aa9c Argument "312;charset=utf-8" isn't numeric in
> addition (+) at /usr/local/lib/perl/5.8.4/Perlbal/XS/HTTPHeaders.pm line 9
8.
>
> Looks like your parsing code isn't coping with this issue (when clients
> append "charset=utf-8" to the content-length??).
>
> I need to do some pretty graphs of the stats.
>
> Russ
>
> Brad Fitzpatrick wrote:
> 
>
>






[ Post a follow-up to this message ]



    Re: Announce: perlbal-1.2  
christopher@baus.net


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


 
03-08-05 02:27 AM

>> Nice, just put it live (with the usual absolutely no testing), and it

Wow that some balls .. err I mean confidence!







[ Post a follow-up to this message ]



    Re: Announce: perlbal-1.2  
Mike Whitaker


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


 
05-10-05 09:25 AM


On 8 Mar 2005, at 00:47, Brad Fitzpatrick wrote:

> Hello!
>
> New release of Perlbal.  (shit, it's been like 5 months!)

>   http://www.danga.com/dist/Perlbal/P...ers-0.15.tar.gz

Has anyone done any performance tests to compare requests/sec between
XS and nonXS implementations of this?







[ Post a follow-up to this message ]



    Re: Announce: perlbal-1.2  
Mark Smith


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


 
05-10-05 10:45 PM

> Has anyone done any performance tests to compare requests/sec between
> XS and nonXS implementations of this?

On our side, it's a 30-40% reduction in CPU used.  We saw processes go from
350 requests/sec up to 500 -- and they're no longer maxing out the CPU, so
I don't think that's as high as they'll go.

--
Mark Smith
junior@danga.com






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:08 AM.      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