Incomplete. I just posted to save my progress, probably completely wrong still…
CGI (Common Gateway Interface) has been around for a long time and is considered a standard for server-side dynamic content generation.
CGI provides a mapping from URI to a script stored on a filesystem and a protocol for activating the script, sending the client’s request, and returning the script’s response to the client.
CGI communicates headers and request information to the script by setting well known environment variables and executes it to activate it.
This results in different types of overhead: concurrent requests require multiple processes and each request requires a fork()
, exec()
, and quite likely a script interpreter which may need to consume many resources before being able to respond to the request.