We are trying to adhere to philosophy of one process per Docker container.
So instead of Apache + 4 Python procs in a container, we just want 1 python
proc per container.
I am new to WSGI apps. My question is - what is the most performant native
python server which can run a WSGI app like Pyramid?
Remember, I am trying to just launch one python process. I am not trying to
put a server in front of the python WSGI process.
Any recommendations? A digitalocean article says this should work:
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
def hello_world(request):
return Response('<h1>Hello world!</h1>')
if __name__ == '__main__':
config = Configurator()
config.add_view(hello_world)
app = config.make_wsgi_app()
server = make_server('0.0.0.0', 8080, app)
server.serve_forever()
I assume this all runs as one process. Is this performant enough compared to
Apache or should I use something else?
-alex
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylons-discuss/b9cf75b9-71f0-4d7d-a786-c2564796ff78%40googlegroups.com.