Discussion:
[tornado] Tornado philosophy on dealing with slow clients / buffering reverse proxy?
Jeff Hunter
2018-08-29 19:52:53 UTC
Permalink
Hello,

I have run Tornado in production in the past using nginx as a reverse
proxy. nginx buffers responses from proxied servers, which helps with slow
clients, as described here:

https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/#buffers

I am now considering making a move from nginx to a different load balancer
/ reverse proxy that does *not* buffer responses from proxied servers
(i.e., Tornado). Is this going to cause a problem when dealing with clients
on slow cellular data connections?

I noticed that Unicorn has a philosophy page about this here:
https://bogomips.org/unicorn/PHILOSOPHY.html

"Instead of attempting to be efficient at serving slow clients, unicorn
relies on a buffering reverse proxy to efficiently deal with slow clients."

Does tornado have a similar philosophy, or is it OK to use Tornado directly
with a load balancer / reverse proxy that does *not* buffer responses when
dealing with clients on slow mobile networks?

Thanks!

Best,
Jeff
--
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-tornado+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Pierce Lopez
2018-08-29 23:06:52 UTC
Permalink
Because Tornado is an evented framework, it should work OK without the
reverse proxy buffering the responses. Slow clients do not tie up threads
or processes or anything like that, which they do for Unicorn or Flask.
Tornado, being mostly python, is less efficient in general than a pure-C
evented proxy like Nginx. But Tornado's architecture is pretty good for
this problem, and it should be OK.

- Pierce
Post by Jeff Hunter
Hello,
I have run Tornado in production in the past using nginx as a reverse
proxy. nginx buffers responses from proxied servers, which helps with slow
https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/#buffers
I am now considering making a move from nginx to a different load balancer
/ reverse proxy that does *not* buffer responses from proxied servers
(i.e., Tornado). Is this going to cause a problem when dealing with clients
on slow cellular data connections?
https://bogomips.org/unicorn/PHILOSOPHY.html
"Instead of attempting to be efficient at serving slow clients, unicorn
relies on a buffering reverse proxy to efficiently deal with slow clients."
Does tornado have a similar philosophy, or is it OK to use Tornado
directly with a load balancer / reverse proxy that does *not* buffer
responses when dealing with clients on slow mobile networks?
Thanks!
Best,
Jeff
--
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
For more options, visit https://groups.google.com/d/optout.
--
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-tornado+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...