search

Home  >  Q&A  >  body text

There are two communication methods between nginx and php-fpm. One is TCP and the other is unix socket. Which one is better?

Looking at other people’s blogs, it is said that Unix socket is not so stable

我想大声告诉你我想大声告诉你2709 days ago927

reply all(2)I'll reply

  • 女神的闺蜜爱上我

    女神的闺蜜爱上我2017-06-29 10:10:43

    • unix socket is suitable for both nginx and php-fpm on the same machine

    • TCP is suitable for nginx and php-fpm not on the same machine

    • TCP communication also requires three handshakes

    • Production environment, if high availability is considered. There will be multiple nginx used with multiple php-fpm

    • I haven’t paid attention to the performance

    reply
    0
  • 黄舟

    黄舟2017-06-29 10:10:43

    Meaning that I have not taken care of this thing, it is all configured and used directly by nginx. It is a unix socket, right

    reply
    0
  • Cancelreply