For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > June 2005 > anyone using any of the HTTP server components in a heavy use environment?









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 anyone using any of the HTTP server components in a heavy use environment?
John Napiorkowski

2005-06-08, 9:04 pm

Sorry if this question has been addressed someplace.

I'm wondering if anyone has used any of the HTTP
servers that come with POE in a semiproduction/medium
to heavy use environment? What I mean by this is
something that might server 40-60 connections per
minute, including some database driven pages, etc.

I know that my results might vary, and of course I
will have to do a lot of testing, but I just want to
find out if I am crazy to even be thinking of this.

Thanks!
John Napiorkowski



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
Steve Peters

2005-06-08, 9:04 pm

On Thu, Mar 24, 2005 at 01:04:37PM -0800, John Napiorkowski wrote:
> Sorry if this question has been addressed someplace.
>
> I'm wondering if anyone has used any of the HTTP
> servers that come with POE in a semiproduction/medium
> to heavy use environment? What I mean by this is
> something that might server 40-60 connections per
> minute, including some database driven pages, etc.
>
> I know that my results might vary, and of course I
> will have to do a lot of testing, but I just want to
> find out if I am crazy to even be thinking of this.
>

I'm thinking the various POE-based pastebots in IRCland can hit the 40-60
connections per minute range.

Steve Peters
steve@fisharerojo.org
Bas Schulte

2005-06-08, 9:04 pm

Hi all,

On donderdag, maa 24, 2005, at 22:04 Europe/Amsterdam, John
Napiorkowski wrote:

> I'm wondering if anyone has used any of the HTTP
> servers that come with POE in a semiproduction/medium
> to heavy use environment? What I mean by this is
> something that might server 40-60 connections per
> minute, including some database driven pages, etc.


Ok, I have a similar question, yet my definition of medium to heavy is
different ;)

How do POE::Component::Server::HTTP and/or POE::Component::Server::TCP
handle loads of 40-60 connections/requests *per second* on a
reasonably (r)(d)ecent intel box with linux on it?

I'm using apache 1.x/mod_perl as an application server for this now
(doesn't serve html and stuff), with POE on the backend for different
stuff. Might be nice to use POE to build a lean and mean app server...

Anyone care to comment on this? I'd love to try it out but as always:
short on time to actually do it and load-test it.

Thanks,

Bas.

Mathieu Longtin

2005-06-08, 9:04 pm

We're using PoCo::Server::HTTP, and most our request, even
if they require making multiple access to multiple sqlite
DBs, are answered within .2 seconds. I don't have any hard
numbers about concurrency, but it seems to be holding well.

--- John Napiorkowski <jjn1056@yahoo.com> wrote:
> Sorry if this question has been addressed someplace.
>
> I'm wondering if anyone has used any of the HTTP
> servers that come with POE in a semiproduction/medium
> to heavy use environment? What I mean by this is
> something that might server 40-60 connections per
> minute, including some database driven pages, etc.
>
> I know that my results might vary, and of course I
> will have to do a lot of testing, but I just want to
> find out if I am crazy to even be thinking of this.
>
> Thanks!
> John Napiorkowski
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
>




__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
Bas Schulte

2005-06-08, 9:04 pm

Hi Rob,

On vrijdag, maa 25, 2005, at 00:24 Europe/Amsterdam, Rob Bloodgood
wrote:

[color=darkred]
> I've had EXTREMELY good luck with writing app servers using an apache
> front end. apache gets the request, and I use a mod_perl handler to
> call the POE server with a question (based on the request). When poe
> comes back with the answer, I format it and respond appropriately.
> I've *EASILY* handled loads in the 120 requests/second range... right
> this minute the box is serving 85/sec and the load on the box is under
> 1.0... and apache is getting most of that load.
>
> I'd be happy to share details and code tidbits if you like.


Cool! Sounds comforting :)

What you are doing actually is exactly what I want to do: the current
"application server" (stripped down apache/mod_perl with really just
one mod_perl handler, "handleCommand", that receives the command
parameters in an http post of a Storable serialized data structure)
sits behind another apache/mod_perl server that handles the external
http requests from our customers.

I'm fairly new to POE and expect to go live with a POE-based backend
server in the next few ws. This server is *vital* to our operations
and I've really missed info like you're giving here. This backend
server typically won't be handling more than 10 to 20 requests per
second yet if I miss only one of them, I'm seriously in trouble ;)

META remark: I'd love to see more detailed "success stories" where POE
is used for enterprise-y solutions on poe.perl.org... If someone might
be interested in using POE as a basis for middleware in a serious
production environment (which I was/am), it would be quite comforting
to read stories where POE is used for this type of thing. To be honest,
stories on how POE manages irc channels or is used successfully as the
basis for "ping" are not the type of thing that convinces my boss POE
is serious stuff (sorry; bosses seem to be like that :)).

Elaborating on that: would love a story on your experiences on there,
John ;)

For now, I'd sure love to see a snippet of the client code that you use
in your mod_perl handler and a corresponding snippet that shows the
basic structure of your POE server.

Also, have you ever experienced situations where your POE server did
not respond as expected? Weird crashes/core dumps/stopped responding
and thus needing a restart? How long has it been running and how many
requests did it handle if it ever needed to be restarted? Have you
experienced memory leaks (was just thinking about the posts the past
few days on IKC::Server leaking memory)?

Thanks for any info you care to give!

As soon as my new POE backend server turns out to be a success, I'll
submit an article on it to poe.perl.org.

Cheers,

Bas.

David Davis

2005-06-08, 9:04 pm

I can give you what I have written... Apache::Backend::POE

It hasn't been heavily tested or given a proper build and docs..but I
can help you get started using it.

It caches connections ala Apache::DBI too.

Interested?

David

On Thu, 24 Mar 2005 23:39:01 +0100, Bas Schulte <bschulte@zeelandnet.nl> wrote:
> Hi all,
>
> On donderdag, maa 24, 2005, at 22:04 Europe/Amsterdam, John
> Napiorkowski wrote:
>
>
> Ok, I have a similar question, yet my definition of medium to heavy is
> different ;)
>
> How do POE::Component::Server::HTTP and/or POE::Component::Server::TCP
> handle loads of 40-60 connections/requests *per second* on a
> reasonably (r)(d)ecent intel box with linux on it?
>
> I'm using apache 1.x/mod_perl as an application server for this now
> (doesn't serve html and stuff), with POE on the backend for different
> stuff. Might be nice to use POE to build a lean and mean app server...
>
> Anyone care to comment on this? I'd love to try it out but as always:
> short on time to actually do it and load-test it.
>
> Thanks,
>
> Bas.
>
>



--
David Davis
Perl Programmer
http://teknikill.net/

Try CPAN Suggest!
http://cpan.teknikill.net/
Bas Schulte

2005-06-08, 9:04 pm

Hi David,

On vrijdag, maa 25, 2005, at 01:30 Europe/Amsterdam, David Davis wrote:

> I can give you what I have written... Apache::Backend::POE
>
> It hasn't been heavily tested or given a proper build and docs..but I
> can help you get started using it.
>
> It caches connections ala Apache::DBI too.
>
> Interested?


Thanks for the offer but personally, I'm interested in hard numbers and
experience with having stuff like this running in production systems
for longer periods of time. I already did a POE server sitting behind
an apache/mod_perl server which is about to go in production, but have
no experience on how it will do.

BTW, connection caching sounds good, won't mind seeing that!

Cheers,

Bas.

philip@awale.qc.ca

2005-06-08, 9:04 pm


On 25-Mar-2005 David Davis wrote:
> I can give you what I have written... Apache::Backend::POE
>
> It hasn't been heavily tested or given a proper build and docs..but I
> can help you get started using it.
>
> It caches connections ala Apache::DBI too.
>
> Interested?


I'd be very interested in looking at Apache::Backend::POE.

I've done something pretty similar, only I mixed IKC with Mason. For web
sites, I use mod_perl, but for web applications, I use PoCo::Server::HTTP

-Philip

Bas Schulte

2005-06-08, 9:04 pm

Hi Phiilip,

On vrijdag, maa 25, 2005, at 09:03 Europe/Amsterdam, philip@awale.qc.ca
wrote:

>
> On 25-Mar-2005 David Davis wrote:
>
> I'd be very interested in looking at Apache::Backend::POE.
>
> I've done something pretty similar, only I mixed IKC with Mason. For
> web
> sites, I use mod_perl, but for web applications, I use
> PoCo::Server::HTTP


What are your experiencess with PoCo::Server:: HTTP as webapp server
and what is the type of traffic/connections per second that it handles?

I wonder about performance as well: how would apache/mod_perl stack up
with a PoCo::Server::HTTP server when both are basically running the
same handler code? With apache using lots of preforked children and POE
using it's own way of handling multiple connections.

Or to have a fair comparison, would it be better to base a server on
Poco::Server::PreforkTCP?

With PoCo::Server:: HTTP, requests would be handled sequentially,
unless my current mod_perl code is changed to handle requests
piece-by-piece using RC_WAIT/$response->continue() instead of one long
request.

Sure is intriguing to find out how all this compares.

Cheers,

Bas.

David Davis

2005-06-08, 9:04 pm

I'm releasing Apache::Backend::POE today, look for it on CPAN soon.
I'll also post the url on the list for those that want it sooner.

David

On Fri, 25 Mar 2005 19:20:40 +0000, Matt S Trout
<poe-perl-org@trout.me.uk> wrote:
> On Thu, Mar 24, 2005 at 04:30:54PM -0800, David Davis wrote:
>
> I'd be fascinated to see this; I've been pondering something along the
> same lines, although I was looking at welding it into Maypole or similar.
>
> Any chance you could either stick a copy to play with up to download
> somewhere? (or mail it off-list if necessary, but I think there're a few
> people wanting copies now :)
>
> --
> Matt S Trout Brag sheet: http://trout.me.uk/services.html
> LAMP, Infrastructure Contact: services@trout.me.uk
> and Automation
> specialist Do it once. Do it right.
>



--
David Davis
Perl Programmer
http://teknikill.net/

Try CPAN Suggest!
http://cpan.teknikill.net/
Matt S Trout

2005-06-08, 9:04 pm

On Thu, Mar 24, 2005 at 04:30:54PM -0800, David Davis wrote:
> I can give you what I have written... Apache::Backend::POE
>
> It hasn't been heavily tested or given a proper build and docs..but I
> can help you get started using it.
>
> It caches connections ala Apache::DBI too.
>
> Interested?


I'd be fascinated to see this; I've been pondering something along the
same lines, although I was looking at welding it into Maypole or similar.

Any chance you could either stick a copy to play with up to download
somewhere? (or mail it off-list if necessary, but I think there're a few
people wanting copies now :)

--
Matt S Trout Brag sheet: http://trout.me.uk/services.html
LAMP, Infrastructure Contact: services@trout.me.uk
and Automation
specialist Do it once. Do it right.
John Napiorkowski

2005-06-08, 9:04 pm

I think once I get a concise list of the options, I'll
try to put together some sort of comprehensive test,
comparing them to each other and maybe to
apache+mod_perl, if I can get the code pretty even
between them.

-john

--- David Davis <david.davis@gmail.com> wrote:
> I'm releasing Apache::Backend::POE today, look for
> it on CPAN soon.
> I'll also post the url on the list for those that
> want it sooner.
>
> David
>
> On Fri, 25 Mar 2005 19:20:40 +0000, Matt S Trout
> <poe-perl-org@trout.me.uk> wrote:
> Davis wrote:
> Apache::Backend::POE
> build and docs..but I
> something along the
> into Maypole or similar.
> with up to download
> I think there're a few
> http://trout.me.uk/services.html
> services@trout.me.uk
> Do it once. Do it right.
>
>
> --
> David Davis
> Perl Programmer
> http://teknikill.net/
>
> Try CPAN Suggest!
> http://cpan.teknikill.net/
>




__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
Kaare Rasmussen

2005-06-08, 9:04 pm

> I used PoCo::Server::SimpleHTTP to create an application server that
> uses YAML for serialization (we call it YOAP since it is replacing SOAP
> which is just getting too slow to use).


Interesting, this Yoap. Can it be made secure with SSL or otherwise?

--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Nordre Fasanvej 12 Åben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk
Bas Schulte

2005-06-08, 9:04 pm

Hi Mike,

On vrijdag, maa 25, 2005, at 00:41 Europe/Amsterdam, Mike Schroeder
wrote:

> This is obviously not under full load, although we have tried firing
> off multiple yoap_poe_clients simultaneously (each one firing off
> multiple parallel requests) with no noticeable impact on response
> time. Also, some of the time is for the logic that was being
> performed for the tests, but we have been pretty happy with the
> responsiveness thus far.
>
> Here is a sample of some SLA data (yoapd logs the elapsed time for
> each request to MySQL and then exposes the summarized stats as an RSS
> feed) we collect for every module/method:
>
> Number of Requests: 896
> Minimum Response Time: 0.0401399992406368
> Average Response Time: 0.34166623725988
> Maximum Response Time: 1.64588105678558
>
> Sorry I don't have more load data for you -- I'll keep you posted when
> we get that done.


Ok, the numbers look good though, so far.


> Let me know if you are interested in YOAP and I'll see if I can
> package it up for CPAN.


Sure thing, I've been wanting to take a look at using YAML as well
(i.s.o. handcoded xml).

Let me know when you're going to put it on CPAN so I can take a look.

Regards,

Bas.

philip@awale.qc.ca

2005-06-08, 9:04 pm


On 27-Mar-2005 Tim Cheadle wrote:
> I've had nothing but good experiences using YAML with Perl.


- YAML.pm is unacceptably slow : parsing a 87kb file on my computer
(2.4Ghz) takes 2 seconds!
- YAML.pm is unstable. Writing out a data ref, reading it back in
should produce the same data in all cases. YAML.pm doesn't in to many
cases.
- YAML.pm can dump core if you through binary (ie 0x00-01f) data at it.

Had I time, I'd reimplement based on the BNF in
http://yaml.org/spec/current.html

-Philip

Ed Heil

2005-06-08, 9:04 pm

Ever compare YAML::Parser::Syck?

http://whytheluckystiff.net/syck/

Syck's supposed to be some pretty hot stuff, but I haven't compared
Syck and YAML.pm directly...

On Mar 31, 2005, at 1:56 PM, philip@awale.qc.ca wrote:

>
> On 27-Mar-2005 Tim Cheadle wrote:
>
> - YAML.pm is unacceptably slow : parsing a 87kb file on my computer
> (2.4Ghz) takes 2 seconds!
> - YAML.pm is unstable. Writing out a data ref, reading it back in
> should produce the same data in all cases. YAML.pm doesn't in to
> many
> cases.
> - YAML.pm can dump core if you through binary (ie 0x00-01f) data at it.
>
> Had I time, I'd reimplement based on the BNF in
> http://yaml.org/spec/current.html
>
> -Philip
>


Bas Schulte

2005-06-08, 9:04 pm

Hi Philip,

On vrijdag, apr 1, 2005, at 20:21 Europe/Amsterdam, philip@awale.qc.ca
wrote:

> On 25-Mar-2005 Bas Schulte wrote:
>
> I use PoCo::Server::HTTP in a low traffic environment. However, using
> it
> and my PoCo::Deamon module in pre-forking mode produces the following
> results.
>
> Serving up inline content. That is, content generated with :
>
> $response->content(<<HTML);
> ... HTML HERE ...
> HTML
>
> ab -n 1000 -c 20 http://dw-2:33100/
>
> Requests per second: 40.82 [#/sec] (mean)
> Time per request: 489.90 [ms] (mean)
> Time per request: 24.50 [ms] (mean, across all concurrent
> requests)
>
> Server is a Celeron 2.8Ghz, with 256Mb RAM. Load was 0.40.
>
> Serving static content from a file.
>
> ab -v 1 -n 1000 -c 20 http://dw-2:33100/static/stylee.css
>
> Requests per second: 41.76 [#/sec] (mean)
> Time per request: 478.92 [ms] (mean)
> Time per request: 23.95 [ms] (mean, across all concurrent
> requests)
> Transfer rate: 413.97 [Kbytes/sec] received
>
> Server is a Celeron 2.8Ghz, with 256Mb RAM. Load was 0.70.


Thanks for the details!

To be honest, I think these numbers are somewhat disappointing, I
recall (I'm getting old ;)) stats from apache serving static content in
the 300/reqs per seconds range and I've seen peaks on our
Apache/mod_perl "application server" (stripped Apache, mod_perl, with
one mod_perl handler executing commands) of around 50/s. That was based
on input on production servers, never really had the time to see where
the max. was.

For me, it's no problem: the POE-based daemon I wrote won't be handling
more than max. 10 reqs/second for the foreseeable future.

I'm just toying with the idea of replacing our app server with
something POE-based, but it might not be worth it. Apache/mod_perl
"just works", except for the extra hassles to share data and control
concurrency between apache children. I think I could come up with a
more elegant approach using POE on that subject (sharing
data/concurrency control etc.) but if I won't get more than 40
reqs/second, that elegance isn't worth it.

Cheers,

Bas.

philip@awale.qc.ca

2005-06-08, 9:04 pm


On 25-Mar-2005 Bas Schulte wrote:
> What are your experiencess with PoCo::Server:: HTTP as webapp server
> and what is the type of traffic/connections per second that it handles?


I use PoCo::Server::HTTP in a low traffic environment. However, using it
and my PoCo::Deamon module in pre-forking mode produces the following
results.


Serving up inline content. That is, content generated with :

$response->content(<<HTML);
.... HTML HERE ...
HTML


ab -n 1000 -c 20 http://dw-2:33100/

Requests per second: 40.82 [#/sec] (mean)
Time per request: 489.90 [ms] (mean)
Time per request: 24.50 [ms] (mean, across all concurrent requests)

Server is a Celeron 2.8Ghz, with 256Mb RAM. Load was 0.40.



Serving static content from a file.

ab -v 1 -n 1000 -c 20 http://dw-2:33100/static/stylee.css

Requests per second: 41.76 [#/sec] (mean)
Time per request: 478.92 [ms] (mean)
Time per request: 23.95 [ms] (mean, across all concurrent requests)
Transfer rate: 413.97 [Kbytes/sec] received

Server is a Celeron 2.8Ghz, with 256Mb RAM. Load was 0.70.

-Philip

Arthur Bergman

2005-06-08, 9:04 pm

On 1 Apr 2005, at 19:21, philip@awale.qc.ca wrote:

> Serving static content from a file.
>
> ab -v 1 -n 1000 -c 20 http://dw-2:33100/static/stylee.css
>
> Requests per second: 41.76 [#/sec] (mean)
> Time per request: 478.92 [ms] (mean)
> Time per request: 23.95 [ms] (mean, across all concurrent
> requests)
> Transfer rate: 413.97 [Kbytes/sec] received
>
> Server is a Celeron 2.8Ghz, with 256Mb RAM. Load was 0.70.
>


Do you cache the contents of the file in memory (inside the app) or do
you read it every time?

Cheers
Arthur

-----
CTO @ Fotango Ltd
+447834716919
http://www.fotango.com/



________________________________________
______________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
________________________________________
______________________________
philip@awale.qc.ca

2005-06-08, 9:04 pm


On 03-Apr-2005 Arthur Bergman wrote:
> On 1 Apr 2005, at 19:21, philip@awale.qc.ca wrote:
>
> Do you cache the contents of the file in memory (inside the app) or do
> you read it every time?


Read it every time and let the OS sort out caching.

-Philip

Arthur Bergman

2005-06-08, 9:04 pm

Ah, then you are still not testing just POE, would be interesting to
see what the result with just from memory would be...

Cheers
Arthur

-----
CTO @ Fotango Ltd
+447834716919
http://www.fotango.com/

On 5 Apr 2005, at 02:21, philip@awale.qc.ca wrote:

>
> On 03-Apr-2005 Arthur Bergman wrote:
>
> Read it every time and let the OS sort out caching.
>
> -Philip
>


philip@awale.qc.ca

2005-06-08, 9:04 pm


On 05-Apr-2005 Arthur Bergman wrote:
> Ah, then you are still not testing just POE, would be interesting to
> see what the result with just from memory would be...


In my original post, I have inline content (ie, from memory) and static
content (from file). Inline content should be very similar to static
cached from file.

However, I'd like to point out that I wouldn't use perl in a heavy use
environment. Perl optimizes developement time, not resources used at
deployement. Linux's disk cache optimizes memory caching across all uses
of the computer, not just my application. I agree that it breaks POE
preemtability, but I use pre-forking servers anyway, one request per
process at a time. So maybe my benchmarks aren't a good test of POE.

-Philip
philip@awale.qc.ca

2005-06-08, 9:04 pm

Some furthur benchmarks :

Serving static content from a file with apache 2.0 installed from FC3 RPM.

ab -v 1 -n 1000 -c 200 http://dw-2/

Requests per second: 570.78 [#/sec] (mean)
Time per request: 350.40 [ms] (mean)
Time per request: 1.75 [ms] (mean, across all concurrent requests)

Same Celeron 2.8Ghz, with 256Mb RAM, server. Load average is undetectable.

-Philip

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com