CGI, FastCGI, SCGI and WSGI

HN LEE
learn-backend
Published in
1 min readMay 16, 2020

Background of CGI

  • Only Static Contents -> Dynamic Contents
  • Web server needs to communicate with Web application

CGI

  • Common Gateway Interface
  • Interface between web server (Apach, Nginx, etc) and web application (PHP, Node.js, Python, etc)

Weakness of CGI

  • Generate new processes at each requests
  • Hard to set distribution system

FastCGI

  • A permanent process handles requests.
  • Separate web server and web application to change network protocol like as TCP. → Easy to set distributed system
  • No-dependency on programming languages or platforms

SCGI

  • Simple Common Gateway Interface
  • Similar as FastCGI

WSGI

  • Web Server Gateway Interface
  • Popular implementation: uWSGI

--

--

HN LEE
learn-backend

A Software Engineer who believes the tech could make the world better.