Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Lighttpd as a simple proxy to TG
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
venkatbo  
View profile  
 More options Aug 24 2006, 2:11 pm
From: "venkatbo" <venka...@yahoo.com>
Date: Thu, 24 Aug 2006 11:11:01 -0700
Local: Thurs, Aug 24 2006 2:11 pm
Subject: Lighttpd as a simple proxy to TG
Hi folks,

Since flup is not *available* for some reason, Im looking to evaluating
lighttpd as a simple proxy to TG, based on the steps in:
  http://www.turbogears.org/preview/docs/deployment/lighttpd.html#proxy

Could anyone tell me what the limitations are to this approach as
compared to the SCGI/WSGI method in:
  http://www.turbogears.org/preview/docs/deployment/lighttpd.html#proxy

Also in the SCGI/WSGI method, there is a reference to the statement:
  "This method will not work with the standard visit model..."
Could anyone explain what the "standard visit model" is... Googled
around, but couldn't get any more info for this context.

Thanks,
/venkat


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cliff Wells  
View profile  
 More options Aug 24 2006, 2:34 pm
From: Cliff Wells <cl...@develix.com>
Date: Thu, 24 Aug 2006 11:34:28 -0700
Local: Thurs, Aug 24 2006 2:34 pm
Subject: Re: [TurboGears] Lighttpd as a simple proxy to TG

On Thu, 2006-08-24 at 11:11 -0700, venkatbo wrote:
> Hi folks,

> Since flup is not *available* for some reason, Im looking to evaluating
> lighttpd as a simple proxy to TG, based on the steps in:
>   http://www.turbogears.org/preview/docs/deployment/lighttpd.html#proxy

> Could anyone tell me what the limitations are to this approach as
> compared to the SCGI/WSGI method in:
>   http://www.turbogears.org/preview/docs/deployment/lighttpd.html#proxy

> Also in the SCGI/WSGI method, there is a reference to the statement:
>   "This method will not work with the standard visit model..."
> Could anyone explain what the "standard visit model" is... Googled
> around, but couldn't get any more info for this context.

I'd recommend not using Lighty for this purpose.  Take a look at Pound
instead:

http://www.apsis.ch/pound/

What I typically do is run both Lighty and TG behind the Pound proxy,
with TG serving dynamic content and Lighty serving everything that's
under /static.

An example pound.conf might look like:

ListenHTTP
    Address    your.external.ip.address
    Port       80
    Err500     "/etc/pound/err500.html"
    Err503     "/etc/pound/err503.html"
    HeadRemove "(X-Forwarded-For|X-SSL-Connect)"

    Service
        HeadRequire "Host: .*\.yourdomain\.com.*"
        Url "/(static|images|css|javascript|flash)/.*"
        BackEnd
            Address 127.0.0.1
            Port    8080
        End
    End
    Service
        HeadRequire "Host: .*\.?yourdomain\.com.*"
        BackEnd
            Address 127.0.0.1
            Port    8081
        End
    End
End

Then setup Lighty to run on port 8080 and your TurboGears app to run on
8081 and you're set.

Regards,
Cliff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
venkatbo  
View profile  
 More options Aug 24 2006, 3:36 pm
From: "venkatbo" <venka...@yahoo.com>
Date: Thu, 24 Aug 2006 12:36:41 -0700
Local: Thurs, Aug 24 2006 3:36 pm
Subject: Re: Lighttpd as a simple proxy to TG
Thanks Cliff.

I just checked out Pound. May be I'm missing something, but other
than Load Balancing & Reverse Proxy, I don't see it offering anything
more than what lighty alone can already do as per:
  http://www.turbogears.org/preview/docs/deployment/lighttpd.html#proxy

I'll not be building a hi traffic site, so may not benefit from pound.
Ligthy can already be compiled for SSL, pcre etc., and be setup to
talk to TG (even over a UDS, if I'm right). What I need is all the
extra http functionality lighty provides over and above what CherryPy
(TG) can provide.

Pl. let me know what I would gain by using pound in my scenario.

Thanks,
/venkat


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cliff Wells  
View profile  
 More options Aug 24 2006, 4:04 pm
From: Cliff Wells <cl...@develix.com>
Date: Thu, 24 Aug 2006 13:04:10 -0700
Local: Thurs, Aug 24 2006 4:04 pm
Subject: Re: [TurboGears] Re: Lighttpd as a simple proxy to TG

On Thu, 2006-08-24 at 12:36 -0700, venkatbo wrote:
> Thanks Cliff.

> I just checked out Pound. May be I'm missing something, but other
> than Load Balancing & Reverse Proxy, I don't see it offering anything
> more than what lighty alone can already do as per:
>   http://www.turbogears.org/preview/docs/deployment/lighttpd.html#proxy

> I'll not be building a hi traffic site, so may not benefit from pound.
> Ligthy can already be compiled for SSL, pcre etc., and be setup to
> talk to TG (even over a UDS, if I'm right). What I need is all the
> extra http functionality lighty provides over and above what CherryPy
> (TG) can provide.

> Pl. let me know what I would gain by using pound in my scenario.

The real question is: what would you gain by using Lighty?  You are
asking about a proxy solution and Pound is a proxy.  Lighty can *act* as
a proxy, but it's really a web server (in fact, the reverse proxy
support is new to the latest point release).  Since CherryPy is already
a web server, what is the point in putting another web server in front
of it?  

In short, Pound gains you simplicity and singleness of purpose.

Also, FWIW, I switched to Lighty around a year ago and I've found it
pretty disappointing.  Jan Knetche appears to have more interest in
catering to the Rails community and going to conferences than fixing
outstanding bugs.  Lighty's config syntax is dismal.  At first it
appears quite elegant, but soon you realize it's actually a gross hack
and is broken in several key ways.  There are obvious misfeatures in its
syntax and some parts are outright broken and have remained so for quite
some time.  It's pretty sad when bugs stick around so long that they
acquire names ("The Nested Conditional bug" being one that grates on me
to no end).

I still use Lighty for its original purpose, that is, serving static
content, but find that maintaining complex configurations to be more of
a pain than it's worth and so avoid it whenever possible.  Frankly I'm
hoping that one of the other lightweight web servers steps up to take
Lighty's place soon.

Regards,
Cliff

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cliff Wells  
View profile  
 More options Aug 24 2006, 4:08 pm
From: Cliff Wells <cl...@develix.com>
Date: Thu, 24 Aug 2006 13:08:54 -0700
Local: Thurs, Aug 24 2006 4:08 pm
Subject: Re: [TurboGears] Re: Lighttpd as a simple proxy to TG

On Thu, 2006-08-24 at 12:36 -0700, venkatbo wrote:
> What I need is all the extra http functionality lighty provides over
> and above what CherryPy (TG) can provide.

Sorry, somehow in my haste to reply I didn't see that last sentence:
what functionality are you hoping for?

Cliff

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
venkatbo  
View profile  
 More options Aug 24 2006, 5:09 pm
From: "venkatbo" <venka...@yahoo.com>
Date: Thu, 24 Aug 2006 14:09:34 -0700
Local: Thurs, Aug 24 2006 5:09 pm
Subject: Re: Lighttpd as a simple proxy to TG
Thanks Cliff, for your observations.

Basically, I needed to provide support for:
  -  HTTP/1.1
  -  SSL (openssl)
  -  (Fast)CGI
  -  chroot()
  -  sessions
  -  static content

I thought lighty would be providing all except the sessions part,
which I was hoping to make it disk/file-based. The # of simultaneous
users will be in the 20's. Initially no db invloved (data coming from
other backend apps), but may have a db later.

/venkat


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Ippolito  
View profile  
 More options Aug 24 2006, 6:43 pm
From: "Bob Ippolito" <b...@redivi.com>
Date: Thu, 24 Aug 2006 15:43:51 -0700
Local: Thurs, Aug 24 2006 6:43 pm
Subject: Re: [TurboGears] Re: Lighttpd as a simple proxy to TG
One problem with Lighty is that it leaks memory like a sieve [1]. I
audited it for a little bit and I gave up, it's a mess. I'd steer
clear of it, it will quickly ruin your day if you throw a lot of
traffic at it.

The only solution I know of that's extremely high performance that
offers all of the features that you want is nginx [2], but its
documentation is largely in Russian. I can't read Russian, but I was
able to figure it out (the configuration language isn't Russian,
neither is C source). I currently have nginx doing reverse proxy of
over tens of millions of HTTP requests per day (thats a few hundred
per second) on a *single server*. At peak load it uses about 15MB RAM
and 10% CPU on my particular configuration (FreeBSD 6).

Under the same kind of load, apache falls over (after using 1000 or so
processes and god knows how much RAM), pound falls over (too many
threads, and using 400MB+ of RAM for all the thread stacks), and
lighty *leaks* more than 20MB per hour (and uses more CPU, but not
significantly more).

[1] http://trac.lighttpd.net/trac/ticket/758
[2] http://sysoev.ru/en/

-bob

On 8/24/06, venkatbo <venka...@yahoo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cliff Wells  
View profile  
 More options Aug 24 2006, 7:20 pm
From: Cliff Wells <cl...@develix.com>
Date: Thu, 24 Aug 2006 16:20:39 -0700
Local: Thurs, Aug 24 2006 7:20 pm
Subject: Re: [TurboGears] Re: Lighttpd as a simple proxy to TG

On Thu, 2006-08-24 at 15:43 -0700, Bob Ippolito wrote:
> The only solution I know of that's extremely high performance that
> offers all of the features that you want is nginx [2], but its
> documentation is largely in Russian. I can't read Russian, but I was
> able to figure it out (the configuration language isn't Russian,
> neither is C source). I currently have nginx doing reverse proxy of
> over tens of millions of HTTP requests per day (thats a few hundred
> per second) on a *single server*. At peak load it uses about 15MB RAM
> and 10% CPU on my particular configuration (FreeBSD 6).

I'm glad to hear of someone I trust trying this server.  Someone was
espousing it on the #cherokee channel, but I hadn't gotten around to
trying it out.  Guess I have to now.  Thanks for the info.

Cliff

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
venkatbo  
View profile  
 More options Aug 24 2006, 8:16 pm
From: "venkatbo" <venka...@yahoo.com>
Date: Thu, 24 Aug 2006 17:16:13 -0700
Local: Thurs, Aug 24 2006 8:16 pm
Subject: Re: Lighttpd as a simple proxy to TG
Bob,

Thanks for that insight :-)
I somehow got the impression lighty was the rage these days, second
only to apache. With this kink of a leak issue, unclear how it attained
that position ;!)

Will give nginx a try. Thanks.
/venkat


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cliff Wells  
View profile  
 More options Aug 24 2006, 9:44 pm
From: Cliff Wells <cl...@develix.com>
Date: Thu, 24 Aug 2006 18:44:58 -0700
Local: Thurs, Aug 24 2006 9:44 pm
Subject: Re: [TurboGears] Re: Lighttpd as a simple proxy to TG

On Thu, 2006-08-24 at 15:43 -0700, Bob Ippolito wrote:
> The only solution I know of that's extremely high performance that
> offers all of the features that you want is nginx [2], but its
> documentation is largely in Russian. I can't read Russian, but I was
> able to figure it out (the configuration language isn't Russian,
> neither is C source). I currently have nginx doing reverse proxy of
> over tens of millions of HTTP requests per day (thats a few hundred
> per second) on a *single server*. At peak load it uses about 15MB RAM
> and 10% CPU on my particular configuration (FreeBSD 6).

Here's a nice document for those interested.

http://blog.kovyrin.net/2006/04/17/typical-nginx-configurations/

Cliff

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Damjan  
View profile  
 More options Aug 25 2006, 2:15 pm
From: "Damjan" <gdam...@gmail.com>
Date: Fri, 25 Aug 2006 18:15:11 -0000
Local: Fri, Aug 25 2006 2:15 pm
Subject: Re: Lighttpd as a simple proxy to TG
Interesting, I have an instance of lighttpd serving only static files
for more than month and a half and it's total memory usage is less than
5MB.

So it must be same of the modules you used?
mod_scgi or mod_proxy?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
venkatbo  
View profile  
 More options Aug 25 2006, 6:01 pm
From: "venkatbo" <venka...@yahoo.com>
Date: Fri, 25 Aug 2006 15:01:00 -0700
Subject: Re: Lighttpd as a simple proxy to TG
Hi Damjan,

Could you pl. list the lighty modules you have running
in your app. If possible, if you could also provide snippets
of your lighttpd.conf file, it would be useful.

Thanks,
/venkat


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Damjan  
View profile  
 More options Aug 26 2006, 9:50 pm
From: "Damjan" <gdam...@gmail.com>
Date: Sat, 26 Aug 2006 18:50:22 -0700
Local: Sat, Aug 26 2006 9:50 pm
Subject: Re: Lighttpd as a simple proxy to TG
As I said, it's only serving static content, there is no application.
And lighttpd only uses "mod_alias", "mod_access", "mod_accesslog".

My point was that the memory leak is not in the core of lighttpd but in
some of it's modules. Since there is a choice which module to use to
connect to WSGI applications, we should see what modules have leaks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cliff Wells  
View profile  
 More options Aug 28 2006, 7:45 am
From: Cliff Wells <cl...@develix.com>
Date: Mon, 28 Aug 2006 04:45:06 -0700
Local: Mon, Aug 28 2006 7:45 am
Subject: Re: [TurboGears] Re: Lighttpd as a simple proxy to TG

On Thu, 2006-08-24 at 18:44 -0700, Cliff Wells wrote:
> On Thu, 2006-08-24 at 15:43 -0700, Bob Ippolito wrote:

> > The only solution I know of that's extremely high performance that
> > offers all of the features that you want is nginx [2], but its
> > documentation is largely in Russian. I can't read Russian, but I was
> > able to figure it out (the configuration language isn't Russian,
> > neither is C source). I currently have nginx doing reverse proxy of
> > over tens of millions of HTTP requests per day (thats a few hundred
> > per second) on a *single server*. At peak load it uses about 15MB RAM
> > and 10% CPU on my particular configuration (FreeBSD 6).

> Here's a nice document for those interested.

> http://blog.kovyrin.net/2006/04/17/typical-nginx-configurations/

I've added a page to Trac showing a basic (well, a bit more than basic)
setup for using Nginx with TurboGears for anyone interested.

http://trac.turbogears.org/turbogears/wiki/NginxIntegration

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sanjay  
View profile  
 More options Sep 27 2006, 7:44 am
From: "Sanjay" <skpate...@gmail.com>
Date: Wed, 27 Sep 2006 04:44:16 -0700
Local: Wed, Sep 27 2006 7:44 am
Subject: Re: Lighttpd as a simple proxy to TG
Thanks for all the posts in this thread, would be vitally useful to me.
Some real novice questions:

- flup is not available? Does it imply we can no more have SCGI/WSGI
configuration?
- As with LightTPD, will SCGI/WSGI be faster compared to simple
proxying in NgineX?
- Any tutorial/guidance on how to configure SCGI/WSGI with Nginex would
help.
- By "This method will not work with the standard visit model...," I
understood that we can still use the identity package, but with
"visit.on=False" in app.cfg. Is it not so? Or, we can't use the
identity package althgether?

Sanjay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
venkatbo  
View profile  
 More options Sep 27 2006, 5:57 pm
From: "venkatbo" <venka...@yahoo.com>
Date: Wed, 27 Sep 2006 14:57:08 -0700
Local: Wed, Sep 27 2006 5:57 pm
Subject: Re: Lighttpd as a simple proxy to TG

Sanjay wrote:
> - flup is not available? Does it imply we can no more have SCGI/WSGI
> configuration?

It is now available... Sadd's website was offline then...

> - Any tutorial/guidance on how to configure SCGI/WSGI with Nginex would
> help.

No tutorial that I know of, but between:

http://www.cleverdevil.org/computing/34/deploying-turbogears-with-lig...
  http://docs.turbogears.org/1.0/LightTPD
       and
  http://trac.turbogears.org/turbogears/wiki/NginxIntegration
you may find enuf info to get it to work.

/venkat


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Ippolito  
View profile  
 More options Sep 27 2006, 6:02 pm
From: "Bob Ippolito" <b...@redivi.com>
Date: Wed, 27 Sep 2006 15:02:56 -0700
Local: Wed, Sep 27 2006 6:02 pm
Subject: Re: [TurboGears] Re: Lighttpd as a simple proxy to TG
On 8/26/06, Damjan <gdam...@gmail.com> wrote:

> As I said, it's only serving static content, there is no application.
> And lighttpd only uses "mod_alias", "mod_access", "mod_accesslog".

> My point was that the memory leak is not in the core of lighttpd but in
> some of it's modules. Since there is a choice which module to use to
> connect to WSGI applications, we should see what modules have leaks.

mod_proxy definitely leaks. When I attempted to deploy lighttpd, that
was the *only* module I was using (no static content even) and it
leaked memory like a sieve.

nginx does not leak at all (at least for proxy, fcgi, rewrite, static
content). The config language is simpler, and it also uses less memory
and CPU than anything else I've tried (and this is at a load of > 500
req/sec at times).

I don't think scgi is a choice with nginx at the moment, but fcgi and
proxying definitely are.

-bob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »