On Tue, Jan 26, 2010 at 2:04 PM, Mike Orr <[email protected]> wrote: > On Tue, Jan 26, 2010 at 11:39 AM, PF4Pylons <[email protected]> wrote: >> Hi all >> >> I was told by a programmer (I am not one :D ) that an application that >> runs Pylons via CGI is not going to be performant in a shared hosting >> environment and I may not be allowed to use it. As reason for poor >> performance the programmer indicated the fact the the server will have >> to spawn a new process each time a request comes. >> >> Is that so? > > That's why people don't use CGI in production. But FastCGI was > designed specifically to overcome this. Pylons has several deployment > options: ProxyPass, mod_wsgi, FastCGI, etc. These are all similar in > performance (maybe not identical, but certainly better than CGI). I > would start with ProxyPass because it's the most straightforward > (just connect Apache to your existing PasteHTTPServer), but it's worth > exploring all of them and seeing which one best meets your needs. > > I haven't used FastCGI so I can't answer your specific questions on it. >
ProxyPass will get you setup very quickly. However, FastCGI is actually the preferred method where I work. It ends up being pretty much like ProxyPass except instead of an HTTP request being sent to the process, it's a set of CGI parameters. That translates to a bit of savings due to HTTP being a bit complicated to negotiate. You can also do things like manage how many FastCGI processes are running and such which makes management nicer as you need to scale up. In a shared hosting environment, I am pretty certain they will want you to use FastCGI. That's because they see which processes are out there and connected to the web server, versus various web servers that are targets for proxy requests and otherwise unconnected. -- Jonathan Gardner [email protected] -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
