[Web-SIG] CGI in PEP 444

Antoine Pitrou solipsis at pitrou.net
Tue Jan 4 19:24:32 CET 2011


Eric Larson <eric at ...> writes:
> It is important to recognize that "production" doesn't necessarily
> have to be some ultra powerful server somewhere that is central to
> some organization. A simple server running Apache with CGI is just as
> valid a production environment as an EC2 cluster. This is especially
> true when you are the only person using the application and
> requirements are minimal. The point being that in terms of the
> specification, it should be plausible a person could use a WSGI
> application without heavy server requirements. Shared hosting is the
> obvious example here but minimal virtual machines may also fit into
> this category.

That sounds backwards. If you use a shared hosting or some minimal virtual
machine, you are much more concerned about resource consumption than if you have
ample processing power (*). And indeed, big companies often have wasteful setups
(including overblown and/or badly-written applications/frameworks/etc.) while
individuals and non-profits have to optimize their setups much more carefully.

(*) (and not only *you* are concerned, but so is your host ;-))

Also, the latency imposed by CGI to each request (due to startup overhead) can
be a problem not only for resource consumption but also for responsiveness and
therefore usability of the Web site/app. Why not use wsgiref directly, at least?

(for the record, the leading Web scripting language, PHP, has moved away from
CGI and standardized on mod_php eons ago)

Regards

Antoine.




More information about the Web-SIG mailing list