Performance Comparison of Congested HTTP/2 Links

Performance Comparison of Congested HTTP/2 Links
Slide Note
Embed
Share

This study delves into the comparison of congested HTTP/2 links, addressing issues in HTTP/1.1 and HTTP/2 connections, background insights on the Hypertext Transfer Protocol, the impact of increasing website complexity on speed, and solutions like domain sharding to optimize connection usage. Explore the challenges and solutions for enhancing web performance in the evolving digital landscape.

  • Web Performance
  • HTTP/2
  • Connection Optimization
  • Website Complexity
  • Domain Sharding

Uploaded on Feb 21, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Performance Comparison of Congested HTTP/2 Links Brian Card, CS 577 12/7/2014 1

  2. Outline HTTP/1.1 and HTTP/2 Connections Problem Statement Experimental Setup Results Worcester Polytechnic Institute 2

  3. HTTP/1.1 and HTTP/2 Connections 3

  4. Background of HTTP HTTP is the Hypertext Transfer Protocol, the underlying protocol of the Web Major version of HTTP/1.1 was finalized in RFC 2616 in 1999 Why do we need a new version of HTTP? Worcester Polytechnic Institute 4

  5. Speed! Average website complexity is increasing! Users expect more features and better performance at the same time! Increasing capacity does not solve problem, latency has a significant affect on page load time http://httparchive.org/trends.php?s=All&minlabel=Nov+15+2010&maxlabel=Nov+15+2014 Worcester Polytechnic Institute 5

  6. HTTP/1.1 Connection Usage HTTP/1.1 connections can request a single object at a time But there are many objects in a webpage and some have dependencies What happens if I want to parallelize downloads? Need to open multiple TCP connections (usually max 6) What happens if a less important object is downloaded first? This is a problem Head Of Line Blocking where a large unimportant file clogs up the connection Worcester Polytechnic Institute 6

  7. Domain Sharding Maximum of 6 connections per domain Client Server Worcester Polytechnic Institute 7

  8. Domain Sharding Create More Domains! Server Server Client Server Server Worcester Polytechnic Institute 8

  9. Domain Sharding Average Number of Domains per website is 18! http://httparchive.org/trends.php Worcester Polytechnic Institute 9

  10. Domain Sharding Average Number of (TCP) Connections per Page http://httparchive.org/interesting.php Worcester Polytechnic Institute 10

  11. Other HTTP/1.1 tricks Inline files, (base64 encode an image, put it in CSS file) Concatenate files (push all CSS files into a single file) All trying to get the same amount of content to stream over a single connection or multiple simultaneous connections Worcester Polytechnic Institute 11

  12. HTTP/2 Multiplexed Streaming Can stream multiple resources over the same connections Resources are prioritized by specifying a dependency graph, no Head Of Line Blocking Worcester Polytechnic Institute 12

  13. HTTP/2 Multiplexed Streaming Single TCP connection per domain Up to 100 Streams per TCP connection Client Server Worcester Polytechnic Institute 13

  14. Other features of HTTP/2 Header Compression Binary Protocol (HTTP/1.1 is text) Encryption Required Server Push (Server can push resources uninitiated) Worcester Polytechnic Institute 14

  15. Problem Statement But What About Congestion Control? 15

  16. Congestion Control HTTP/1.1 uses many connections When a packet is dropped, only one connection goes into congestion avoidance Throughput of a single connection is halved HTTP/2 has one connection, when a packet is dropped the throughput of the entire download is halved HTTP/2 connections may reach higher speeds faster, since new connections do not need to be created If websites do not load faster, people won t use HTTP/2 Worcester Polytechnic Institute 16

  17. This Project Quantify the effects of congestion control on HTTP/1.1 vs HTTP/2 Will HTTP/2 make domain sharding disappear? Worcester Polytechnic Institute 17

  18. Experimental Setup 18

  19. Overview Server 1 192.168.1.30 Server 2 192.168.1.31 HTTP . . . Server n 192.168.1.[n-1] Web site hosted by multiple servers on a Virtual Machine. HTTP/1.1 and HTTP/2 servers are swapped out depending on experiment. Measure time to load page completely. Virtual Box Ubuntu VM Worcester Polytechnic Institute 19

  20. Setup Details MacBook Air 10.8.5 Mountain Lion http-server 0.7.4 (node.js) nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) VirtualBox 4.3.6 Ubuntu 14.04 LTS Firefox Nightly 36.0a1 Network Link Conditioner (Late July 2012) IP Aliasing to create multiple addresses Worcester Polytechnic Institute 20

  21. Setup Details (continued) http-server used as the HTTP/1.1 Server nghttp used as the HTTP/2 server Had to edit codebase to support multiple servers binding to different IP addresses on the same machine Sample website is hosted by either server Measure the time it takes to load under varying network conditions TLS enabled on both web servers Worcester Polytechnic Institute 21

  22. Firefox Settings Firefox network analyzer used to measure page load time Nightly build has latest HTTP/2 support Caching disabled: about:config Setting Value true true false false network.http.spdy.enabled.http2 network.http.spdy.enabled.http2draft network.http.use-cache browser.cache.offline.enabled Worcester Polytechnic Institute 22

  23. Sample Website HTML CSS JavaScript Images 1*60KB 1*60KB 5*1KB 10*1KB 5*10KB 10*5KB 5*20KB 20*20KB 5*37KB 5*40KB 5*140KB Total 60KB 60KB 340KB 1360KB =1820KB Worcester Polytechnic Institute 23

  24. Sample Website (continued) Each file is mostly filled with comments to take up available space Content is rendered below the fold For sharded domains objects are distributed equally between domains This ensures equal load between domains In the real world, resources would typically be segregated by domains (images all on one set of domains) Worcester Polytechnic Institute 24

  25. Results 25

  26. Results Warm-up run used before collection results eliminates some startup costs on servers do not want to test implementation differences between http servers Results are average of 3 runs Worcester Polytechnic Institute 26

  27. Varying Capacity in Ideal Conditions Page Download Times for HTTP/2 No Delay, No Loss Page Download Time for HTTP/1.1 No Delay, No Loss 35000 35000 30000 30000 25000 25000 Time (ms) Time (ms) 20000 20000 15000 15000 10000 10000 5000 5000 0 0 0.1 1 10 100 0.1 1 10 100 Throughput Mbps Throughput Mbps One Domain Two Domains One Domain Two Domains Three Domains Five Domains Three Domains Five Domains Worcester Polytechnic Institute 27

  28. Comparison of HTTP/2 vs HTTP/1.1 Difference In Page Download TIme, Higher Values show HTTP/2 Advantage 800 600 400 Time Difference (ms) 200 0 -200 -400 -600 -800 -1000 0.5 5 50 Throughput Mbps One Domain Two Domains Three Domains Five Domains Worcester Polytechnic Institute 28

  29. Comparison of HTTP/2 vs HTTP/1.1 Page Download Time HTTP/2 vs HTTP/1.1 No Delay, No Loss 30% Percent Increase vs HTTP/1.1 20% 10% 0% -10% -20% -30% 0.5 5 50 Throughput Mbps One Domain Two Domains Three Domains Five Domains Worcester Polytechnic Institute 29

  30. Varying Capacity, 79ms of Delay Page Download Times HTTP/2 vs HTTP/1.1 79ms Delay, No Loss 70% 60% Percent Increase vs HTTP/1.1 50% 40% 30% 20% 10% 0% 0.1 1 10 100 -10% Throughput Mbps One Domain Two Domains Three Domains Five Domains Worcester Polytechnic Institute 30

  31. One Domain HTTP/2 vs 5 Domains HTTP/1.1 HTTP/2 With One Domain vs HTTP/1.1 With Five Domains 79ms Delay, No Loss 35000 40% 35% 30000 Percent Increase for HTTP/2 30% Page Load Time ms 25000 25% 20000 20% 15% 15000 10% 10000 5% 5000 0% 0 -5% 0 10 20 30 40 50 60 Throughput Mbps HTTP/2 One Domain HTTP/1.1 Five Domains HTTP/2 Percent Increase Worcester Polytechnic Institute 31

  32. Increase In Performance for Increasing Domains in HTTP/2? HTTP/2 Speed Increases For Increasing Domains 79ms, No Loss 20% Percent Improvement Over Single Domain 15% 10% 5% 0% -5% -10% -15% 0.1 1 10 100 Throughput Mbps One Domain Two Domains Three Domains Five Domains Worcester Polytechnic Institute 32

  33. Loss for HTTP/1.1 and HTTP/2 Fixed Throughput at 5Mbps Fixed Latency at 79ms Varied Delay 1%, 2%, 5%, 10% Last value for single domain HTTP/2 is optimistic ; ran more than three runs and timeouts were occurring Worcester Polytechnic Institute 33

  34. Loss For HTTP/1.1 and HTTP/2 Page Load Times With Varying Loss Rate 79ms Delay, 5Mbps Throughput 140000 120000 Page Load Time (ms) 100000 80000 60000 40000 20000 0 0% 2% 4% 6% Loss 8% 10% 12% HTTP/1.1 Five Domains HTTP/2 Five Domains HTTP/2 One Domain Worcester Polytechnic Institute 34

  35. Conclusions HTTP/2 has increased performance over HTTP/1 for non-congested links Unclear if domain sharding will disappear with HTTP/2 Under high loss links, HTTP/2 performs significantly worse HTTP/2 may not be ubiquitous, advantages for high bandwidth delay product links with no loss Worcester Polytechnic Institute 35

Related


More Related Content