PHP request data through TCP to C + + server, one data request, if the concurrency is too high, then the CGI process and TCP connection overhead is too high, how to improve it?
This is mainly the CGI process overhead, as well as the TCP connection overhead problem, how to make different PHP requests to share the TCP connection?
Reply content:
PHP request data through TCP to C + + server, one data request, if the concurrency is too high, then the CGI process and TCP connection overhead is too high, how to improve it?
This is mainly the CGI process overhead, as well as the TCP connection overhead problem, how to make different PHP requests to share the TCP connection?
Pfsockopen
Stream_socket_client with Stream_client_persistent
Can be done after the request does not destroy the TCP link, the next use can be reused.
NGINX+PHP-FPM Pro Test Available