"I still fail to see how this relates to reverse proxying? Might it be
that you don't know what that actually is?

http://en.wikipedia.org/wiki/Reverse_proxy

It has nothing to do with mod_proxy."

Well,
I thought that the way you setup the tg app in production is by using
apache and mod_proxy, and pass all data back and fourth between apache
and tg cherry py service. You could use mod_proxy (which worked for
me) and mod_rewrite (which didn't work for me).  From the link you
sent me: "The Apache HTTP Server may be extended with mod_proxy to be
used as a reverse proxy".







On Mon, Jun 30, 2008 at 1:43 AM, Sanjay <[EMAIL PROTECTED]> wrote:
>
> Thanks to all you guys for such elaborative inputs! Quite valuable for
> TG practioners like me.
>
>> Second reason I choose mod_Wsgi /apache over reverse proxy is the fact
>> that apache starts and stops my app, my logs are unified in one apache
>> log file(including log rotation). There is no need for other programs
>> to supervise my tg app. You can use apache to serv your static content
>> . Can't beat the 4 lines of configuration in apache config file.
>>
>> Why would you go the harder way?
>> Lucas
>
> This seems a valuable tips. If the performance is more or less same,
> it tempts me to learn this method, but before that a few layman
> apprehensions:
>
> 1. Is scaling up (by running multiple proceses on one or more boxes)
> any difficult using this option, compared to the reverse proxing?

With mod_wsgi you have option to let apache handle all the processes
and threads or specify number of processes and threads you would like
to use. You have an option to specify what user runs it, what group,
what virtualenv it will use, use svn to control the source code of the
app, etc.

The base setting I use is :" threads=10 processes=3" so if you deploy
a tg via start-myproject not sure what the process count is; 1?, Not
sure what the threads count is ?
As far as multiple servers, I guess if you put a load balancer in
front of the apache server you should scale pretty well.
http://lucasmanual.com/mywiki/TurboGears#head-82950e34ce949adaa1a08b1008aa4aa60149aac7



> 2. Does this option hold good for TG 2.0/Pylons as well? I guess yes.

wsgi support should be better in general as time progresses.

> 3. Any disadvantage in this option, for high traffic sites, compared
> to the other methods?

"Embedded mode is the best mode for very large sites as it is able to
harness the feature of Apache to scale up to meet demand by creating
more child processes to handle requests and reap those processes when
no longer required"

Give it a try and let us know what settings you finally decided give
you better choice.

Below is the difference that convinced me.
I think the whole point is what is easier to setup and maintain. I use
mod_wsgi because apache handles the whole app for me.

Apache+mod_wsgi:
- takes care of starting stopping, restarting, killing my app
- takes care of logs
 -allows me to use svn  , and just update to a newer version of my app
by "svn update", "apache2 reload"
- 3 processes out of the box seem better to me then 1.
- Apache to serve you static content.
- virtualenv for multiple tg/sa versions.

Apache+mod_proxy+start-myproject:
- You have to deploy via egg. create an egg, install it. (same process
for updates)
- You have to start it manually or find a program that will start it
for you (never found easy to follow howto on doing this) (you can use
supervisor, howto needed)
-  The default setup doesn't do log rotation, (step by step howto needed)
- If program or thread crashes you have to "ps -A" and kill each
before you can start another one.
- Does this setup support virtualenv setup? Multiple tg version on the
same server?
- If you have 3 different apps installed you have to start managing
what port they are on. 4 months from now will you remember what port
you installed your app? What port you should install next app.


I can setup the whole deployment from scratch in few minutes. My
maintenance cost is almost 0 thereafter, which means I can write
another tgapp instead of reading documentation on how to use
supervisor, or how to use start-myapp in virtualenv.


mod-wsgi is really useful, and I can't stress enough how easy it is to
setup the whole deployment.

Thanks,
Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to