3 ms·
CGI is just a simple 'plugin' standard for web server's request processing path. Instead of having internal code process the request, it's sent out to outside a
by zare_st 3y ago
CGI is just a simple 'plugin' standard for web server's request processing path. Instead of having internal code process the request, it's sent out to outside application. Historically a web server process was executed from inet supervisor, which controlled socket mapping and connection accepts. So inet daemon would manage TCP, httpd would manage HTTP and CGI handler would manage the content.
There were multiple exec's in a request chain which was pretty slow. Web servers started to consolidate both ends under a same process - whatever was executed via CGI could be compiled to a dynamic library for direct interfacing, and web server could implement its own connection handler with multiple concurrency strategies instead of a simplistic fork one done by inetd.