Comparison of HTTP/1.1, HTTP/2 and HTTP/2 + Server Push

Published The results of studying the performance of various methods of extracting resource collections, using HTTP/1.1, HTTP/2, and HTTP/2 + Server Push protocols for server requests. The study also evaluated the impact of browser cache on performance and resource manipulation at the application logic level (consolidating resources into a single JSON block).

Performance testing of 25 requests revealed generally predictable results—HTTP/1.1 lagging noticeably with an empty cache, and resource returns being maximized when delivered as a single block (tests labeled 'compound'). Firefox and Chrome performed similarly, but the presence of cached data did not lead to the expected increase in efficiency.

Comparison of HTTP/1.1, HTTP/2 and HTTP/2 + Server Push

However, in the test involving 500 requests, a noticeable lag of Chrome compared to Firefox emerged when handling a large number of requests, and Firefox lagged behind Chrome when using Server Push and HTTP/2 with most data available in the browser cache. Chrome demonstrated more efficient cache handling, while Firefox was more effective at processing external requests.

Comparison of HTTP/1.1, HTTP/2 and HTTP/2 + Server Push

Comparison of HTTP/1.1, HTTP/2 and HTTP/2 + Server Push

The tests concluded that HTTP/2 allows for fairly efficient handling of individual requests for a large collection of resources. The performance differences between simple separate resource delivery schemes and methods that aggregate resources into a single block are not significant enough to justify the considerable complication of processing logic on the application side. serverAggregation makes sense only in scenarios where performance is the highest priority. When simplicity of logic and a straightforward API are more important, using separate resource processing is advisable.

Another finding is that browser caching when using HTTP/2 does not significantly impact request processing performance (the total execution of 501 requests was found to be slower than executing 51 requests with 90% cache filled by 1.2 times in Firefox and 2.3 times in Chrome). The use of Server Push did not show significant benefits in Firefox but proved effective for loading a large number of resources in Chrome. The authors of the study also noted that server-side optimization has a more substantial effect on performance than optimizing the client-side code executed in the browser.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster