3 ms·
FastCGI apps can be fronted by a server that supports HTTP2, and if the server supports `Link` headers for pushing related resources, can get those benefits as
by francislavoie 6y ago
FastCGI apps can be fronted by a server that supports HTTP2, and if the server supports `Link` headers for pushing related resources, can get those benefits as well. Caddy is a good fit there with the push directive https://caddyserver.com/docs/caddyfile/directives/push https://caddyserver.com/docs/caddyfile/directives/push and the fastcgi transport https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#the-fastcgi-transport https://caddyserver.com/docs/caddyfile/directives/reverse_pr...
One advantage of FastCGI is that it's inherently easy to scale horizontally and load balance because it basically forces the apps to have no state. This is one of the big benefits that PHP happens to have for that reason.
- thayne 6y agoIt's possible to use http/2 between the load balancer and the app server (haproxy 2.0+ supports this, caddy supports h2, but not h2c). FastCGI has been around longer, and there are probably more reverse proxies that support it on the backend than h2c (or even just h2), but I'm not sure if there are any technical advantages to using FastCGI as the protocol over http/2.
- francislavoie 6y agoCaddy does support h2c actually. It can be enabled on the server https://caddyserver.com/docs/json/apps/http/servers/allow_h2c/ https://caddyserver.com/docs/json/apps/http/servers/allow_h2... and at the HTTP proxy module https://caddyserver.com/docs/json/apps/http/servers/routes/handle/reverse_proxy/transport/http/versions/ https://caddyserver.com/docs/json/apps/http/servers/routes/h...