Discussion:
[jifty-devel] Production hosting setup/config
Mark Aufflick
2010-02-08 02:10:06 UTC
Permalink
Hi all,

Wondering if people can share their production hosting configs. I've been
trying fast cgi with Apache (both mod_fastcgi and mod_fcgid) with varying
success. mod_fcgid doesn't seem suitable due to the long startup time of new
children. mod_fastcgi is better (using the jifty/CGI::Fast built in process
control) but I still get an issue where sometimes in a fresh browser the
combined/squished css doesn't get delivered due to a 500 for some reason
(only get the incomplete headers warning in the log) and I need to reload.
Doesn't happen with eg. jifty server. I'm also seeing a fair delay on the
squished .css .js files before they get delivered in Firebug. I don't see
that with jifty server so I assume that's also fastcgi related. I have 8
fastcgi children, so that's not the issue.

To use mod_perl2 I'll have to compile an entirely new apache and get another
ip for my server, so before I go down that route I thought I'd source the
wisdom of the crowd :)

I also usually do gzip compression in the perl layer, which I guess I can
hack into the handler - does anyone do that? Or is mod_deflate the standard
approach?

Mark.
--
Mark Aufflick
contact info at http://pumptheory.com/about

http://pumptheory.com
iPhone and Enterprise software development
Mark Aufflick
2010-02-08 05:21:08 UTC
Permalink
Jesse, I saw your email (from 2007) about SpamAssassin's apache style perl
pre-forking. Did you ever go down that road? I'm thinking a fast,
multi-child, daemon proxied through apache is the simplest fast way to go.
I'm going to see if Net::Server::PreFork is good enough, but I've seen
inconsistent reports about it's performance.

http://www.mail-archive.com/jifty-***@lists.jifty.org/msg00905.html

<http://www.mail-archive.com/jifty-***@lists.jifty.org/msg00905.html>The
other advantage of going to a standalone process (instead of fastcgi) is
that the frontend could be Perlbal (or any other proxy) instead of Apache or
lighty etc.
Post by Mark Aufflick
Hi all,
Wondering if people can share their production hosting configs. I've been
trying fast cgi with Apache (both mod_fastcgi and mod_fcgid) with varying
success. mod_fcgid doesn't seem suitable due to the long startup time of new
children. mod_fastcgi is better (using the jifty/CGI::Fast built in process
control) but I still get an issue where sometimes in a fresh browser the
combined/squished css doesn't get delivered due to a 500 for some reason
(only get the incomplete headers warning in the log) and I need to reload.
Doesn't happen with eg. jifty server. I'm also seeing a fair delay on the
squished .css .js files before they get delivered in Firebug. I don't see
that with jifty server so I assume that's also fastcgi related. I have 8
fastcgi children, so that's not the issue.
To use mod_perl2 I'll have to compile an entirely new apache and get
another ip for my server, so before I go down that route I thought I'd
source the wisdom of the crowd :)
I also usually do gzip compression in the perl layer, which I guess I can
hack into the handler - does anyone do that? Or is mod_deflate the standard
approach?
Mark.
--
Mark Aufflick
contact info at http://pumptheory.com/about
http://pumptheory.com
iPhone and Enterprise software development
--
Mark Aufflick
contact info at http://pumptheory.com/about

http://pumptheory.com
iPhone and Enterprise software development
Jesse Vincent
2010-02-09 16:51:37 UTC
Permalink
Post by Mark Aufflick
Jesse, I saw your email (from 2007) about SpamAssassin's apache style perl
pre-forking. Did you ever go down that road? I'm thinking a fast,
multi-child, daemon proxied through apache is the simplest fast way to go.
I'm going to see if Net::Server::PreFork is good enough, but I've seen
inconsistent reports about it's performance.
other advantage of going to a standalone process (instead of fastcgi) is
that the frontend could be Perlbal (or any other proxy) instead of Apache or
lighty etc.
jifty server with Net::Server::Prefork is something we do for anything
where we're using Jifty's Comet support, but it's not something we've
tested on an internet-scale webservice.
Jesse Vincent
2010-02-09 16:49:03 UTC
Permalink
Post by Mark Aufflick
Hi all,
Wondering if people can share their production hosting configs. I've been
trying fast cgi with Apache (both mod_fastcgi and mod_fcgid) with varying
success. mod_fcgid doesn't seem suitable due to the long startup time of new
children. mod_fastcgi is better (using the jifty/CGI::Fast built in process
control) but I still get an issue where sometimes in a fresh browser the
combined/squished css doesn't get delivered due to a 500 for some reason
(only get the incomplete headers warning in the log) and I need to reload.
Doesn't happen with eg. jifty server. I'm also seeing a fair delay on the
squished .css .js files before they get delivered in Firebug. I don't see
that with jifty server so I assume that's also fastcgi related. I have 8
fastcgi children, so that's not the issue.
If you come up to the latest Jifty, you can actually have those stored
in Memcache, so you won't see the performance hit anymore.
Post by Mark Aufflick
To use mod_perl2 I'll have to compile an entirely new apache and get another
ip for my server, so before I go down that route I thought I'd source the
wisdom of the crowd :)
We pretty much exclusively use mod_fcgid (and let it use its own process
control). I've not seen the long-startup problem you're mentioning.
Post by Mark Aufflick
I also usually do gzip compression in the perl layer, which I guess I can
hack into the handler - does anyone do that? Or is mod_deflate the standard
approach?
Let mod_deflate do it. It's fast, easy and nicely decoupled from your
perl processes.
Stanislav Sinyagin
2010-02-09 21:26:59 UTC
Permalink
Few days ago I've deployed a virtual machine with 1GB RAM and lighttpd+fcgi
to support three Jifty applications. And there will be at least two more :)

Those are internal enterprise applications, with less than 50 users.
Everything runs fast and smooth.
Sent: Mon, February 8, 2010 3:10:06 AM
Subject: [jifty-devel] Production hosting setup/config
Hi all,
Wondering if people can share their production hosting configs.
Mark Aufflick
2010-02-10 05:28:19 UTC
Permalink
Ok, so I've gone against all the advice and rolled out a child
apache/mod_perl2 server :) I also upgraded to jifty trunk to get the
memcached CAS store and tweaked a few things.

The site is undergoing a few days testing, so feel free to check it out and
post a test job:

http://cocoajobs.info/

On an unrelated note, has anyone ever extended the auth plugin to disable
users after 5 incorrect login attempts? Since anyone can poll for valid
account names via the validate_email_or_username ajax callback, that just
leaves them with brute forcing the password.

If not I'll do it and add it to my fork.
Post by Stanislav Sinyagin
Few days ago I've deployed a virtual machine with 1GB RAM and lighttpd+fcgi
to support three Jifty applications. And there will be at least two more :)
Those are internal enterprise applications, with less than 50 users.
Everything runs fast and smooth.
Sent: Mon, February 8, 2010 3:10:06 AM
Subject: [jifty-devel] Production hosting setup/config
Hi all,
Wondering if people can share their production hosting configs.
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
--
Mark Aufflick
contact info at http://pumptheory.com/about

http://pumptheory.com
iPhone and Enterprise software development
Loading...