CGI Server Requirements

CGI scripts, by their very nature, place an extra burden on the Web server. They're separate programs, which means the server process must spawn a new task for every CGI script that's executed. The server can't just launch your program and then sit around waiting for the response; chances are good that others are asking for URLs in the meantime. So the new task must operate asynchronously, and the server has to monitor the task to see when it's done.

The overhead of spawning a task and waiting for it to complete is usually minimal, but the task itself uses system resources—memory and disk—and also consumes processor time slices. A popular site can easily garner dozens of hits almost simultaneously. If the server tries ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.