<div dir="ltr">Hi<div><br></div><div><span style="font-size:14px">>Nginx allows multiple request and responses in multiple connections using</span><br style="font-size:14px"><span style="font-size:14px">>HTTP/1.x as well. HTTP/2 changes nothing here (except it uses only one</span><br style="font-size:14px"><span style="font-size:14px">>connection, but it's not important from the basic architecture point of</span><br style="font-size:14px"><span style="font-size:14px">>view).</span><br style="font-size:14px"></div><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">If so, it seems there is no difference or improvement of the implementation on the feature of multiplexing compared with Http/1.1 pipeline. </span></div><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">How do you solve the problem Head-of-line blocking occurred in Http/1.1.</span></div><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">Best Regards</span></div><div><span style="font-size:14px">Muhui Jiang</span></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-04 18:19 GMT+08:00 Valentin V. Bartenev <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wednesday 04 May 2016 11:25:11 Muhui Jiang wrote:<br>
> Hi<br>
><br>
> Different from HTTP1.1 pipeline, HTTP2 allows multiple request and response<br>
> messages to be in flight at the same time. I was wondering what the<br>
> strategy Nginx adopt to implement this main feature.<br>
<br>
</span>Nginx allows multiple request and responses in multiple connections using<br>
HTTP/1.x as well. HTTP/2 changes nothing here (except it uses only one<br>
connection, but it's not important from the basic architecture point of<br>
view).<br>
<span class=""><br>
<br>
><br>
> Is every single stream correspond to a thread. If not, how can Nginx<br>
> provide multiple parallel requests handling. If you can locate the<br>
> correspond code for me, that would be great<br>
><br>
<br>
</span>No, nginx uses asynchronous non-blocking event-driven architecture<br>
instead of mapping requests into separate threads.<br>
<br>
It have used multiplexing of requests handling in single process many<br>
years before HTTP/2 was invented.<br>
<br>
A more detailed explanation can be found here:<br>
<a href="https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/" rel="noreferrer" target="_blank">https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/</a><br>
<br>
wbr, Valentin V. Bartenev<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>