What are the differences from running PHP-FPM over Unix Socket and TCP / IP Socket?

There are two ways to run PHP-FPM. I kwno that nothing is bulletproof in technology, but what are the pros and cons of both methods?

+4
source share
1 answer

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

, , , , , , , , , ( , , , , ).

0

Source: https://habr.com/ru/post/1671925/


All Articles