[Dancer-users] deploying many, many apps
Brian E. Lozier
brian at massassi.com
Wed Sep 14 16:20:01 CEST 2011
On Wed, Sep 14, 2011 at 6:11 AM, Puneet Kishor <punk.kish at gmail.com> wrote:
> I have asked, or hinted at, other variants of the same question, but here
> again --
>
> I am now developing and deploying many Dancer apps. Have been experimenting
> with, and am quite happy with Starman serving them hiding behind Apache2
> proxies. My home grown, amateurish web_ctl [
> https://github.com/punkish/web_ctl] helps me manage them as well. However,
> with every app, I am starting an additional 10 Starman processes, so now
> already I have about 60 Starman processes running on my computer.
>
> 1. Why 10? I once tried 2 Starman processes for a very, very low traffic
> app, and found it coughing and sputtering, but surely, 10 is too many, isn't
> it?
>
Well, is starman also serving all your static content? One page view can
have dozens or hundreds of server requests due to images, css, etc. You
could use a tool like abench or something to test for requests per second
and concurrent requests per second.
>
> 2. Why not Apache2 with mod_perl or fastcgi or mod_psgi? Apache seems to
> launch 5-10 "children," but no matter how many apps are being served by it,
> that number of child processes seems to hover around that number. It doesn't
> get to n * 10 for Starman?
>
The numbers are completely configurable on apache. You have to look at
StartServers and Min/Max SpareServers or MinSpareThreads/MaxSpareThreads
depending on which type of apache you're running. Apache will try to deal
with having a reasonable amount running depending on load but it's always
bound by the parameters. If your load gets to be more than the 10 children
can handle then requests will start timing out and things will get sluggish.
>
> The Starman approach does have one clear advantage -- each app can be
> turned off or on separately without having to restart Apache entirely.
>
> I want to get the crowd-wisdom on serving, say 50 different Dancer apps on
> the same computer. The apps will range from very, very low traffic to
> moderate traffic. However, all the apps will be data-intensive, in that,
> even if the number of user-hits on the server are few per hour, each hit
> does a fair bit of database work and sends back largish amounts of data.
> Data may be on the same or a different server -- that part is out of the
> scope for this thread.
>
>
I wouldn't have a problem having 500 mostly idle starman processes hanging
out, but I haven't run in this situation under high load so I don't know
what that would look like. The advantage, being able to install and
maintain the apps separately, is a big one. Where I work now we have 20
different apps all sharing the same apache and it's a nightmare.
> Many thanks in advance.
>
> Puneet.
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110914/8ebd9d6d/attachment.htm>
More information about the Dancer-users
mailing list