CGI,FASTCGI is a set of interface standards, is a programming language (such as Php,python; Python also has WSGI) and Web server (such as NGINX) communication standards (such as you with foreigners, then fastcgi is equivalent to English);
PHP-FPM is the FASTCGI process Manager
FastCGI is a traditional CGI developed from the traditional CGI, the performance is poor, because every time the HTTP server encounters a dynamic program will need to restart the script parser to perform the parsing, and then return the results to the HTTP server.
FASTCGI uses the C/s structure, you can separate the HTTP server and the script parser on different servers, fastcgi start multiple daemons, the Web server and FASTCG through the socket communication, such as the PHP-FPM configuration of Port 9000.
When Nginx accepts a request, the request is forwarded to PHP-FPM,PHP-FPM after the request is received, a new thread is derived, which invokes the PHP interpreter (php-cgi) to process the script and return the data.
What is fastcgi, php-fpm?