Servlets vs CGI

Servlets vs CGI
  • A Servlet does not run in a separate process
  • A Servlet stays in memory between requests
  • There is only a single instance which answers all requests concurrently. 
  • This saves memory and allows a Servlet to manage persistent data
  •  CGI requires more memory & CPU time. 
  • Every link to every CGI program causes web server to create a separate process in which to run CGI.

Disqus Comments