Search code examples
htmlcgicognoscgi-bin

What were the main disadvantages of CGI-BIN based web development?


I was fortunate enough to not do any cgi-bin .cgi based web development. But generally those who have do not seem to 'miss' those days.

A project I recently joined has a performance issue when dealing with the pages that need to communicate to a legacy system that has a CGI-BIN based API. That system is COGNOS 7.

The feedback I received to date is that 'COGNOS is slow' but others have reported great success with COGNOS, I am thinking it has more to do with the access via CGI-BIN and not the performance of COGNOS in and of itself.

All that said what are the main issues that made CGI-BIN based web development non-performant, difficult, etc...


Solution

  • The fundamental architectural issue with CGI-BIN based systems is that each HTTP request requires the server to start a new process. This affects performance in a number of ways:

    • It's expensive to start the process, as the OS pages in the program, sets up the process, etc.
    • Resources can not be shared across requests, so that any DB connections, etc. have to be set up with each request
    • User session state can not be preserved in memory, so it has to be persisted with each request