RE: Why FastCGI?
| From: | Gunter Grodotzki | Date: | Thu, 25 Mar 2021 11:26:38 +0000 |
| Subject: | RE: Why FastCGI? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327522@lists.php.net to get a copy of this message | ||
> The answer is that CGI protocol is simpler to implement. And generallyspeaking, the first step
> is not necessarily HTTP. Thanks Andrey for that context. This makes sense and what I was initial
> curious about. However, as mentioned in a different message: I would not expect PHP to implement a
> “fully spec” http server (which might be even another attack surface opening up) but maybe one
> that only speaks rudimentary 1.1 – where the user is still required to add a
> loadbalancer/cdn/http-server on-top to add fancier thingsI would have hoped, that by now there are
> some stable libraries that can implement that? 😃 (where most HTTP features would come for
> “free”) Maybe just a thought.. I think there would be great benefit for users, especially those
> running PHP in Docker. One current drawback, in the way how FCGI works/is implemented with PHP, you
> need to have a shared volume between Nginx and PHP. If PHP-FPM would speak HTTP, then you could
> still run Nginx and PHP, but other than being able to communicate via tcp there would be zero
> dependency between them. This is also what is currently causing bad practices in Docker, where PHP
> is being shipped with Apache to avoid shared volumes, when Docker containers should really only be
> running a single process... Cheers,Gunter