/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-12 / FW: pound addon - new functionality patch

[ << ] [ >> ]

[ LogLevel 4 in 2.0b4 / Ryan Nielsen ... ] [ problems with HA port implementation / Ted ... ]

FW: pound addon - new functionality patch
"Sergio Freire" <sergio-s-freire(at)ptinovacao.pt>
2005-12-27 21:25:56 [ FULL ]
Hi!

I have made a patch for Pound that adds a new functionality which is very
useful and that can be found in real load-balancers like Alteon.

I added the ability to track sessions by HTTP header name. This is very useful
since in things like the Telecom field you have headers which identify the
mobile client, like the "x-up-calling-line-id" HTTP header. You can think also
on any other header, proprietary or not.

You could also think on track sessions based on the user agent, or whatever
header you like.

The config directive is something like "Session HEADER x-up-calling-line-id
300".

Bellow please find the diff patches against your latest stable version 1.9.5.
Please just give it a little revise; although I have tested it I could have
missed something. The patches are just a few lines long.

 

Best regards,

Sérgio Freire
Attachments:  
text.html text/html 3193 Bytes
httpheadername_addon_against_v195.diff application/octet-stream 1718 Bytes

Re: [Pound Mailing List] FW: pound addon - new functionality patch
Robert Segall <roseg(at)apsis.ch>
2005-12-28 15:30:57 [ FULL ]
On Tue, 2005-12-27 at 20:25 +0000, Sergio Freire wrote:[...]

Many thanks Sergio. Before going into this I'd like to hear from others
if they ever came across something like it.

The extra stuff looks harmless enough, so we'll probably put it in, with
a little modification: the session should be checked/created on replies
as well as requests.

The catch: this will only go into the 2.x series (once they are stable
enough) - the 1.9.x are purely maintenance releases.[...]

RE: [Pound Mailing List] FW: pound addon - new functionality patch
"Sergio Freire" <sergio-s-freire(at)ptinovacao.pt>
2005-12-28 16:23:23 [ FULL ]
Thanks.
I think this is a very useful thing because on production systems on my
company we use Alteon load balancers and many times we tell the Alteon
to keep track by cookies and many times by a specific HTTP header.
If 1.9.x are just maintenance releases it's a pitty if it doesn't get
there.
But maybe like in the 2.4 linux kernel which many thought that it
wouldn't get new features since the 2.6 and they got surprised when they
saw many 2.6 features being backported, who knows if this can come in a
1.9.x release? :) 
Do it the best way.

Another thing, do you have any performance tests, in any version? We are
thinking using this in high load scenarios, places where hardware
solutions don't usually have noticeable problems. From my few and
empiric experience, I thing it performs well but sometimes it seems to
get a bit stuck. Maybe its just an impression... I'll do a load test and
compare it against a hardware solution.

Regards,
Sergio Freire

-----Original Message-----
From: Robert Segall [mailto:roseg(at)apsis.ch] 
Sent: Wednesday, December 28, 2005 2:31 PM
To: pound(at)apsis.ch
Subject: Re: [Pound Mailing List] FW: pound addon - new functionality
patch

On Tue, 2005-12-27 at 20:25 +0000, Sergio Freire wrote:[...]
very useful and that can be found in real load-balancers like Alteon.[...]
very useful since in things like the Telecom field you have headers
which identify the mobile client, like the "x-up-calling-line-id" HTTP
header. You can think also on any other header, proprietary or not.[...]
whatever header you like.[...]
x-up-calling-line-id 300".[...]
1.9.5. Please just give it a little revise; although I have tested it I
could have missed something. The patches are just a few lines long.

Many thanks Sergio. Before going into this I'd like to hear from others
if they ever came across something like it.

The extra stuff looks harmless enough, so we'll probably put it in, with
a little modification: the session should be checked/created on replies
as well as requests.

The catch: this will only go into the 2.x series (once they are stable
enough) - the 1.9.x are purely maintenance releases.[...]

Re: [Pound Mailing List] FW: pound addon - new functionality patch
Ted Dunning <tdunning(at)veoh.com>
2005-12-28 18:10:10 [ FULL ]
In our system, we use a client identifier header field that would be 
better than anything else for load balancing so this feature really 
would be helpful.

Our traffic isn't from an ordinary browser, but it is HTTP.  That is why 
we have extra fields.

Sergio Freire wrote:
[...]
[...]

FW: [Pound Mailing List] FW: pound addon - new functionality patch
"Sergio Freire" <sergio-s-freire(at)ptinovacao.pt>
2005-12-28 19:23:47 [ FULL ]
On behalf of Helder Biscaia...

-----Original Message-----
From: Helder Biscaia 
Sent: Wednesday, December 28, 2005 6:14 PM
To: 'pound(at)apsis.ch'
Cc: Mario Moreira; Salvado; Sergio Freire
Subject: RE: [Pound Mailing List] FW: pound addon - new functionality
patch

Hi Robert,

Thanks for this great software and we really do hope that Sergio's
contribution is worthwhile. We are particularly interested in any load
testing that you (or other users) have carried out. So, if you do have
any please do forward them. Either way, we will be carrying out our own
performance testing the first week of January and will relay the results
on to you if you are interested.  It would be great to compare ;-)

Regards and season's greetings
HB

-----Original Message-----
From: Sergio Freire 
Sent: quarta-feira, 28 de Dezembro de 2005 15:23
To: pound(at)apsis.ch
Cc: Mario Moreira; Helder Biscaia; Salvado
Subject: RE: [Pound Mailing List] FW: pound addon - new functionality
patch

Thanks.
I think this is a very useful thing because on production systems on my
company we use Alteon load balancers and many times we tell the Alteon
to keep track by cookies and many times by a specific HTTP header.
If 1.9.x are just maintenance releases it's a pitty if it doesn't get
there.
But maybe like in the 2.4 linux kernel which many thought that it
wouldn't get new features since the 2.6 and they got surprised when they
saw many 2.6 features being backported, who knows if this can come in a
1.9.x release? :) 
Do it the best way.

Another thing, do you have any performance tests, in any version? We are
thinking using this in high load scenarios, places where hardware
solutions don't usually have noticeable problems. From my few and
empiric experience, I thing it performs well but sometimes it seems to
get a bit stuck. Maybe its just an impression... I'll do a load test and
compare it against a hardware solution.

Regards,
Sergio Freire

-----Original Message-----
From: Robert Segall [mailto:roseg(at)apsis.ch] 
Sent: Wednesday, December 28, 2005 2:31 PM
To: pound(at)apsis.ch
Subject: Re: [Pound Mailing List] FW: pound addon - new functionality
patch

On Tue, 2005-12-27 at 20:25 +0000, Sergio Freire wrote:[...]
very useful and that can be found in real load-balancers like Alteon.[...]
very useful since in things like the Telecom field you have headers
which identify the mobile client, like the "x-up-calling-line-id" HTTP
header. You can think also on any other header, proprietary or not.[...]
whatever header you like.[...]
x-up-calling-line-id 300".[...]
1.9.5. Please just give it a little revise; although I have tested it I
could have missed something. The patches are just a few lines long.

Many thanks Sergio. Before going into this I'd like to hear from others
if they ever came across something like it.

The extra stuff looks harmless enough, so we'll probably put it in, with
a little modification: the session should be checked/created on replies
as well as requests.

The catch: this will only go into the 2.x series (once they are stable
enough) - the 1.9.x are purely maintenance releases.[...]

RE: [Pound Mailing List] FW: pound addon - new functionality patch
Robert Segall <roseg(at)apsis.ch>
2005-12-29 15:02:27 [ FULL ]
On Wed, 2005-12-28 at 15:23 +0000, Sergio Freire wrote:[...]

We have seen quite a few results, both from our testing and from other
people's. This varies from 70 reqs/sec (single P-III 800 MHz) through
450 reqs/sec (twin Athlon) and all the way to 2000 reqs/sec HTTPS (quad
Xeon + hardware crypto acceleration, custom libraries).

Here are some notes on configuration and benchmarking you may find of
interest.

Hardware
========

Pound does not need a lot of CPU for plain HTTP - a simple high-end P-IV
or AMD will probably be enough for over 250 reqs/sec. Go to multiple
CPUs if you need significantly more than that or if you need to do
HTTPS. In any case you'll want to check on hardware accelerators if you
want to support massive HTTPS - a VIA Nehemia 800MHz may well outperform
a P-IV 3GHz with SSL because of its support of crypto operations in
hardware.

Calculate 256KB RAM per thread - at the maximum 1K threads that is
256MB. Make sure you have enough RAM so your system does not need to
swap.

The network cards and external infrastructure are probably the most
important component - they'll affect performance more than anything
else. Make sure you use good cards, use as many of them as necessary,
use good switches/routers and use private segments. Avoid VLANs and
other atrocities if you can.

Do use a large/fast DNS cache on the Pound machine - Pound can be rather
sensitive to name resolution speed.

OS/Libraries
============
Pound is very dependent on the threading library your system supports.
Choose it with care.

For single CPU machines you can try OpenBSD - the system works with a
user-space thread library and thus avoids the context switch overhead.
For multiple CPU machines Solaris/LWP and Linux/NPTL are better choices,
as the threading model allows Pound to use all available CPUs.

Make sure your load does not exceed system limits. Most systems come
with a hard limit of 1K threads, so you'll need a custom-compiled
threads library if you want to go beyond that (for example for
long-lived response cycles and heavy load). Make sure you set the limits
correctly (enough memory, CPU time and file descriptors) before starting
Pound.

Benchmarking
============
Remember that most benchmarks are poor simulations of reality. A simple
request that results in a short reply is not what typically happens on a
Web server, so make sure your benchmark reflects your normal load
parameters: HTTP/1.1 pipelining (major impact!), long responses (over
10K), slow responses (10+ seconds delay on back-ends) and so on.

Remember your system limitations and check on their influence on
results: a normal benchmark issues requests, gets the responses and
calculates performance. Assuming that request+response size is about 5K
(including packet overhead) that implies that a normal 100Mb Ethernet
segment will theoretically allow up to 2000 requests per second - though
in practice you'll see performance degradation long before that.

Make sure of what you test: you can easily "show" that Pound can't
deliver more than 5 transactions per second - by using a very slow
back-end! Make sure that each of your back-ends is capable of at least
the performance you are aiming for before you test Pound.

I hope all this is helpful and I'm looking forward to seeing your
results. Do let us know.[...]

MailBoxer