0

I'm porting an existing Tornado HTTP service to run on Kubernetes.

Should I add gunicorn or uvicorn inside the container before for Tornado processes?

Or should it be a just single Python process with Tornado inside the container?

Also, what are the benefits of using gunicorn/uvicorn for this?

Thanks

Alex

AlexV
  • 3,836
  • 7
  • 31
  • 37
  • This answer proposes that there are benefits on running `gunicorn` with Tornado https://stackoverflow.com/a/22067306/7447711 . As of uvicorn, Tornado does not support ASGI natively, so it would be hacky to make it work. – Mikael Jan 06 '21 at 13:49
  • Gunicorn is a server for WSGI apps (Django, Flask, et al). Tornado comes with a server of its own, therefore it doesn't need Gunicorn. Even Gunicorn docs don't recommend doing this: https://docs.gunicorn.org/en/stable/design.html#tornado-workers – xyres Jan 06 '21 at 16:09
  • @xyres I understood the docs exactly opposite. Although Tornado can be WSGI, it's not recommended. Hence one should use Gunicorn with Tornado worker – AlexV Jan 20 '21 at 08:20
  • @Mikael thanks for the link! Strange I couldn't find this, I Googled and searched SO for this exact question – AlexV Jan 20 '21 at 08:21

0 Answers0