The difference between FPM and WSGI

Here is what I understand so far.

PHP-FPM and WSGI are layers on FastCGI?

So would it be right to say that WSGI is Python FPM?

+4
source share
1 answer

WSGI is not really a FastCGI layer, but a specification for writing Python web applications that are versatile enough that can be tied to many web servers or adapters, which in turn can talk with many other technologies. including FastCGI. But FastCGI itself, which is a protocol for a web server to connect to a lengthy process, does not have to be involved in installing WSGI, for example. the mod_wsgi Apache module, which provides WSGI to your Python application directly from Apache and does not require you to run a separate lengthy process.

WSGI is defined in PEP 333 . A simple application taken from this specification is as follows:

 def simple_app(environ, start_response): """Simplest possible application object""" status = '200 OK' response_headers = [('Content-type', 'text/plain')] start_response(status, response_headers) return ['Hello world!\n'] 
+3
source

All Articles