Tornado server for aiohttp app?

61 views
Skip to first unread message

Wilber H

unread,
Feb 3, 2021, 7:32:01 PM2/3/21
to Tornado Web Server
Hi,

Any way of putting an aiohttp app in a Tornado server?
Looked through the docs but only found support for WSGI (Flask) by putting the app inside a WSGIContainer.  

Wilber H

unread,
Feb 3, 2021, 8:07:24 PM2/3/21
to Tornado Web Server
Basically, is there a Tornado class is intended to let the aiohttp framework run on the Tornado HTTP server and I/O loop?

Ben Darnell

unread,
Feb 3, 2021, 8:58:05 PM2/3/21
to Tornado Mailing List
Tornado just uses the asyncio event loop, so you could run an aiohttp server on one port and a Tornado http server on a second port, both using the same asyncio event loop (and then you could combine them on one port for external visibility via an external reverse proxy). There is not currently any way that I'm aware of to combine aiohttp and Tornado apps on one port. The most likely way this would be done is with ASGI, which is tracked in https://github.com/tornadoweb/tornado/issues/2666.

-Ben

--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-tornado/0352c27d-ac0c-4f8f-87c3-67736cdef2dfn%40googlegroups.com.

Wilber H

unread,
Feb 3, 2021, 9:47:43 PM2/3/21
to Tornado Web Server
Thank you
Reply all
Reply to author
Forward
0 new messages