php +libcurl+nghttp2 实现高性能微服务架构
1、server端
nginx编译时增加参数
configure --with-http_v2_module
server {
listen 80 http2;
server_name localhost;
}
编译nghttp2包
wget https://github.com/nghttp2/nghttp2/releases/download/v1.40.0/nghttp2-1.40.0.tar.gz
./configure
make
make install
安装libcurl
wget https://curl.haxx.se/download/curl-7.67.0.tar.g
./configure --with-nghttp2 --with-ssl --with-zlib
make
make install
编译php
增加参数 --with-curl 即可