Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: best way to balance load to a Perl script

by thunders (Priest)
on Jul 25, 2009 at 23:59 UTC ( #783240=note: print w/ replies, xml ) Need Help??


in reply to best way to balance load to a Perl script

You will get a fair bit of mileage by converting download.pl to a mod_perl handler. In that case you will at least lose the startup time of the perl interpreter. Copying/renaming the script is very unlikely to do anything. As far as your server is concerned calling multiple processes called "/usr/bin/perl /path/to/download.pl" is no more expensive than "/usr/bin/perl /path/to/download2.pl"

What is perl actually doing in this case? Is it actually serving the audio? Or is it just drawing a page that has links to the audio files? In the former case, it may be that perl is not the best tool for the job.

Using multiple load balanced servers will definitely improve performance, but it's critical to identify where the bottleneck is first. Running the script from the command line with the core module Devel::DProf or the CPAN module Devel::NYTProf will help in identifying what's slow.


Comment on Re: best way to balance load to a Perl script

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://783240]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-07-24 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (159 votes), past polls