On 2015-11-22, Artem Chuprina wrote: > OG> * 1 TCP соединение, вместо нескольких. Избегаем задержет на TCP > рукопожатие, > OG> не знаю, может есть также плюс и для SSL/TLS. Итого страничики через > OG> мобильное GPRS будут заметно быстрее открываться. > > По сравнению с чем он дает преимущество? С HTTP/1.1, в котором это > ввели, и который все давно уже умеют?
Таки да: https://tools.ietf.org/html/rfc7230 Хотя 6. Connection Management HTTP messaging is independent of the underlying transport- or session-layer connection protocol(s). все же: HTTP implementations are expected to engage in connection management, which includes maintaining the state of current connections, establishing a new connection or reusing an existing connection, processing messages received on a connection, detecting connection failures, and closing each connection. Most clients maintain multiple connections in parallel, including more than one connection per server endpoint. Most servers are designed to maintain thousands of concurrent connections, while controlling request queues to enable fair use and detect denial-of-service attacks. Это если говорить о количестве соединений к одному серверу. А то я забыл точный текст книги по поводу ограничения на 2 соединения к 1 хосту, и со стандартом не сверялся, в книге так: http://http2-explained.haxx.se/content/en/part3.html#34-sharding Initially the HTTP 1.1 specification stated that a client was allowed to use maximum of two TCP connections for each host. So, in order to not violate the spec clever sites simply invented new host names and – voilá - you could get more connections to your site and decreased page load times. Over time, that limitation was removed and today clients easily use 6-8 connections per host name but they still have a limit so sites continue to use this technique to bump the number of connections. Recent stats from httparchive.org show that the top 300K URLs in the world need on average 40(!) TCP connections to display the site, and the trend says this is still increasing slowly over time. ================================================================ Если же речь о HTTP pipelining - то я об этом ничего не знаю, кроме того что никто из массовых WEB клиентов не использует эту возможность. ================================================================ Попробовал открыть сайт с высокоскоростным соединением, Firefox Web Developer показал: 5'400 ms на connection 40 ms на waiting последующие страницы имели: 0 ms на connection На GPRS соединении у меня connection занимало 5-20 сек и каждое живое TCP соединение делало связь очень напряжной, вплоть до того что браузер отказывался загружать ресурсы по таймауту (это когда рядом открыты вкладки с Ajax долбилками, которые так любят встраивать в комерческие сайты). В общем влияние числа соединений на качество/скорость WEB есть, особенно для мобильной связи (сейчас в сети - подавляющее большинство клиентов - мобильны). Я не нахожу сравнения экспертов - как HTTP 2 на практике решает проблемы. К сожалению на https://www.ietf.org не смог найти информацию о рабочем комитете по HTTP 2 и их целях. Есть теория что WebSocket лучше ложатся в HTTP 2: http://stackoverflow.com/questions/28582935/does-http-2-make-websockets-obsolete https://bloggeek.me/websockets-http2/ Эта штука нужна социалкам, общалкам. -- Best regards!

