performance comparison of congested http/2 linksrek/adv_nets/fall2014/http2.0_project.pdf ·...

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

Upload: others

Post on 30-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Performance Comparison of Congested HTTP/2 Links

Brian Card, CS 577

12/7/2014

1

Page 2: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Outline

• HTTP/1.1 and HTTP/2 Connections

• Problem Statement

• Experimental Setup

• Results

2

Page 3: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

HTTP/1.1 and HTTP/2 Connections

3

Page 4: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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?

4

Page 5: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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 5

Page 6: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

6

Page 7: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Domain Sharding

• Maximum of 6 connections per domain

7

Client Server

Page 8: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Domain Sharding

• Create More Domains!

8

Client

Server

Server

Server

Server

Page 9: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Domain Sharding

• Average Number of Domains per website is 18!

http://httparchive.org/trends.php 9

Page 10: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Domain Sharding

• Average Number of (TCP) Connections per Page

http://httparchive.org/interesting.php 10

Page 11: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

11

Page 12: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

12

Page 13: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

HTTP/2 Multiplexed Streaming

• Single TCP connection per domain

• Up to 100 ‘Streams’ per TCP connection

13

Client Server

Page 14: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Other features of HTTP/2

• Header Compression

• Binary Protocol (HTTP/1.1 is text)

• Encryption Required

• Server Push (Server can push resources uninitiated)

14

Page 15: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Problem Statement But What About Congestion Control?

15

Page 16: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

16

Page 17: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

This Project

• Quantify the effects of congestion control on HTTP/1.1 vs HTTP/2

• Will HTTP/2 make domain sharding disappear?

17

Page 18: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Experimental Setup

18

Page 19: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Overview

19

Server 1 192.168.1.30

Server 2 192.168.1.31

Server n 192.168.1.[n-1]

Virtual Box Ubuntu VM

.

.

.

HTTP

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.

Page 20: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

20

Page 21: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

21

Page 22: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Firefox Settings

• Firefox network analyzer used to measure page load time

• Nightly build has latest HTTP/2 support

• Caching disabled:

22

about:config Setting Value

network.http.spdy.enabled.http2 true

network.http.spdy.enabled.http2draft true

network.http.use-cache false

browser.cache.offline.enabled false

Page 23: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Sample Website

23

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

Page 24: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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)

24

Page 25: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Results

25

Page 26: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

26

Page 27: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Varying Capacity in Ideal Conditions

27

0

5000

10000

15000

20000

25000

30000

35000

0.1 1 10 100

Tim

e (

ms)

Throughput Mbps

Page Download Time for HTTP/1.1

No Delay, No Loss

One Domain Two Domains

Three Domains Five Domains

0

5000

10000

15000

20000

25000

30000

35000

0.1 1 10 100

Tim

e (

ms)

Throughput Mbps

Page Download Times for HTTP/2

No Delay, No Loss

One Domain Two Domains

Three Domains Five Domains

Page 28: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Comparison of HTTP/2 vs HTTP/1.1

28

-1000

-800

-600

-400

-200

0

200

400

600

800

0.5 5 50

Tim

e D

iffe

ren

ce (

ms)

Throughput Mbps

Difference In Page Download TIme, Higher Values show HTTP/2 Advantage

One Domain Two Domains Three Domains Five Domains

Page 29: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Comparison of HTTP/2 vs HTTP/1.1

29

-30%

-20%

-10%

0%

10%

20%

30%

0.5 5 50

Percen

t In

crease v

s H

TTP

/1

.1

Throughput Mbps

Page Download Time HTTP/2 vs HTTP/1.1 No Delay, No Loss

One Domain Two Domains Three Domains Five Domains

Page 30: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Varying Capacity, 79ms of Delay

30

-10%

0%

10%

20%

30%

40%

50%

60%

70%

0.1 1 10 100

Percen

t In

crease v

s H

TTP

/1

.1

Throughput Mbps

Page Download Times HTTP/2 vs HTTP/1.1 79ms Delay, No Loss

One Domain Two Domains Three Domains Five Domains

Page 31: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

One Domain HTTP/2 vs 5 Domains HTTP/1.1

31

-5%

0%

5%

10%

15%

20%

25%

30%

35%

40%

0

5000

10000

15000

20000

25000

30000

35000

0 10 20 30 40 50 60

Percen

t In

crease f

or H

TTP

/2

Pag

e L

oad

Tim

e m

s

Throughput Mbps

HTTP/2 With One Domain vs HTTP/1.1 With Five Domains

79ms Delay, No Loss

HTTP/2 One Domain HTTP/1.1 Five Domains HTTP/2 Percent Increase

Page 32: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Increase In Performance for Increasing Domains in HTTP/2?

32

-15%

-10%

-5%

0%

5%

10%

15%

20%

0.1 1 10 100

Percen

t Im

pro

vem

en

t O

ver S

ing

le D

om

ain

Throughput Mbps

HTTP/2 Speed Increases For Increasing Domains 79ms, No Loss

One Domain Two Domains Three Domains Five Domains

Page 33: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

33

Page 34: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

Loss For HTTP/1.1 and HTTP/2

34

0

20000

40000

60000

80000

100000

120000

140000

0% 2% 4% 6% 8% 10% 12%

Pag

e L

oad

Tim

e (

ms)

Loss

Page Load Times With Varying Loss Rate 79ms Delay, 5Mbps Throughput

HTTP/1.1 Five Domains HTTP/2 Five Domains HTTP/2 One Domain

Page 35: Performance Comparison of Congested HTTP/2 Linksrek/Adv_Nets/Fall2014/HTTP2.0_Project.pdf · •nghttp 0.6.4 (supports draft-ietf-httpbis-http2-14) •VirtualBox 4.3.6 •Ubuntu 14.04

Worcester Polytechnic Institute

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

35