RE: Why FastCGI?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The answer is that CGI protocol is simpler to implement. And generally

speaking, 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:

 

  1. 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 things
  2. I 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux