sajad torkamani

What is FastCGI?

FastCGI is a more-efficient evolution of the CGI protocol, which means it is also a protocol that defines how web servers like Nginx or Apache should interface with external scripts or programs (PHP, Python, Perl, etc) to generate dynamic web content.

The main difference between FastCGI and CGI is in how the web server like Nginx executes external scripts:

FeatureCGIFastCGI
Process modelStarts a new process per requestReuses long-running persistent processes
PerformanceSlow (lots of process creation)Fast (no need to re-launch process)
Resource usageHighLow
Still used?RarelyCommon (especially with PHP-FPM)

Tagged: Misc