The difference mainly lies in the added overhead of using the full network stack to “pack” and “unpack” each piece of data. Keep in mind that the overhead is negligible for most deployments.
Using a socket (e.g. listen = '/tmp/php-fpm.sock) makes sense when both interfaces (e.g. Nginx) and php-fpm are in the same field and
- , (, , , )
- - "", (, , ..).
TCP- (, listen = 127.0.0.1:9000) , , , , Nginx, , php-fpm
, , , , , , , , , ( , , , , ).