chunking - Configure NginX proxy to preserve the chunk size sent from the proxied backend server -
question nginx proxy, there way control chunk size (ie mimic chunks being sent proxy-ed backend server, not breaking chunks)
i have backend server built return chunked responses clients each chunk set full audio part.
when running behind nginx proxy server, nginx seems breaking full chunks returned backend server smaller chunks. data sent properly, original chunks returned server broken several smaller chunks
here sample output,
2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 1414 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 11360 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 2840 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 2840 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 2840 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 2840 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 704 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 2834 bytes 2017/09/11 17:16:20 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 7100 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 9940 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 4260 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 1420 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 2019 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 4254 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 14200 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 1398 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 379 bytes 2017/09/11 17:16:21 debug - com.nuance.httpservlet.utils.httpttsparser: readchunk 0 bytes
from server side logs 7 capture, first 22838 bytes (1414 + 11360 + 840 +2840 +2840 + 2840 + 704) sent single chunk end server,
i have played proxy_buffer_size, proxy_buffering , proxy_busy_buffers_size, options cannot find way force nginx maintain same chunks backend (even huge buffer sizes , numbers), here setting used fro test (not optimal, know explicitly generous narrow down issue)
proxy_buffer_size 5m proxy_buffering: 100 5m
proxy_busy_buffers_size: 5m
i scanned through docs , forums not find way force nginx keep chunks being returned server.
i see there way disable chunked_transfer_encoding not want, want keep chunked_transfer_encoding , control nginx mimic same chunking original backend
please advise if have tips.
thank you
b
so after looking @ nginx code , starting thread support e-mail group (but not answer yet)
we found haproxy has nice feature, when tested with, solved out issue....
option http-no-delay no option http-no-delay instruct system favor low interactive delays on performance in http
the network optimizations favor performance instructing system wait enough data available in order send full packets. typical delays around 200 ms per round trip.
we run haproxy option disabled....so chunks read , forwarded properly
Comments
Post a Comment