Adding proxy protocol spec to TCPServer

33 views
Skip to first unread message

spen...@gmail.com

unread,
Sep 29, 2020, 9:10:34 PM9/29/20
to Tornado Web Server
http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt 

This is something I'm pushing frameworks like uvicorn and the like to support natively.  The more we see proxy protocol in use in microservices, via load balancers and API gateways and the like, the more it seems imperative that HTTP services start to natively support it.

Ben Darnell

unread,
Oct 25, 2020, 3:09:04 PM10/25/20
to Tornado Mailing List
Yeah, it's a good idea. Instead of building this into HTTPServer as we did for `xheaders`, I'd like to have this as a separate server object that can wrap an arbitrary TCPServer. I think the interfaces we have would allow for that, although I'm not certain. There's an open issue for this: https://github.com/tornadoweb/tornado/issues/2492

-Ben

On Tue, Sep 29, 2020 at 9:10 PM sh...@bogomip.com <spen...@gmail.com> wrote:
http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt 

This is something I'm pushing frameworks like uvicorn and the like to support natively.  The more we see proxy protocol in use in microservices, via load balancers and API gateways and the like, the more it seems imperative that HTTP services start to natively support it.

--
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/70f82629-f11f-4b35-858e-9507f29a9dafn%40googlegroups.com.

Shane Spencer

unread,
Oct 25, 2020, 3:12:20 PM10/25/20
to python-...@googlegroups.com
Yep I spent an afternoon on it a while back and couldn’t figure out the best way to do it on my own.  TCPserver and some inherited variables on the proxy protocol information with ab HTTPServer variable to enable it and another to inherit the remote IP from it.

Ran out of time working on it

--
Reply all
Reply to author
Forward
0 new messages