performance comparison of congested http/2 links brian card, cs 577 12/7/2014 1

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

Upload: oswin-francis

Post on 21-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

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

Performance Comparison of Congested HTTP/2 LinksBrian Card, CS 577

12/7/2014

1

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

Worcester Polytechnic Institute2

Outline

• HTTP/1.1 and HTTP/2 Connections

• Problem Statement

• Experimental Setup

• Results

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

3

HTTP/1.1 and HTTP/2 Connections

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

Worcester Polytechnic Institute4

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?

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

Worcester Polytechnic Institute5

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

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

Worcester Polytechnic Institute6

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

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

Worcester Polytechnic Institute7

Domain Sharding

• Maximum of 6 connections per domain

Client Server

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

Worcester Polytechnic Institute8

Domain Sharding

• Create More Domains!

Client

Server

Server

Server

Server

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

Worcester Polytechnic Institute9

Domain Sharding

• Average Number of Domains per website is 18!

http://httparchive.org/trends.php

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

Worcester Polytechnic Institute10

Domain Sharding

• Average Number of (TCP) Connections per Page

http://httparchive.org/interesting.php

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

Worcester Polytechnic Institute11

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

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

Worcester Polytechnic Institute12

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

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

Worcester Polytechnic Institute13

HTTP/2 Multiplexed Streaming

• Single TCP connection per domain

• Up to 100 ‘Streams’ per TCP connection

Client Server

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

Worcester Polytechnic Institute14

Other features of HTTP/2

• Header Compression

• Binary Protocol (HTTP/1.1 is text)

• Encryption Required

• Server Push (Server can push resources uninitiated)

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

15

Problem StatementBut What About Congestion Control?

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

Worcester Polytechnic Institute16

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

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

Worcester Polytechnic Institute17

This Project

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

• Will HTTP/2 make domain sharding disappear?

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

18

Experimental Setup

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

Worcester Polytechnic Institute19

Overview

Server 1192.168.1.30

Server 2192.168.1.31

Server n192.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 Links Brian Card, CS 577 12/7/2014 1

Worcester Polytechnic Institute20

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

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

Worcester Polytechnic Institute21

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

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

Worcester Polytechnic Institute22

Firefox Settings

• Firefox network analyzer used to measure page load time

• Nightly build has latest HTTP/2 support

• Caching disabled:

about:config Setting Valuenetwork.http.spdy.enabled.http2 truenetwork.http.spdy.enabled.http2draft truenetwork.http.use-cache falsebrowser.cache.offline.enabled false

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

Worcester Polytechnic Institute23

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

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

Worcester Polytechnic Institute24

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)

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

25

Results

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

Worcester Polytechnic Institute26

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

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

Worcester Polytechnic Institute27

Varying Capacity in Ideal Conditions

0.1 1 10 1000

5000

10000

15000

20000

25000

30000

35000

Page Download Time for HTTP/1.1

No Delay, No Loss

One Domain Two DomainsThree Domains Five Domains

Throughput Mbps

Tim

e (

ms)

0.1 1 10 1000

5000

10000

15000

20000

25000

30000

35000

Page Download Times for HTTP/2

No Delay, No Loss

One Domain Two DomainsThree Domains Five Domains

Throughput Mbps

Tim

e (

ms)

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

Worcester Polytechnic Institute28

Comparison of HTTP/2vs HTTP/1.1

0.5 5 50-1000

-800

-600

-400

-200

0

200

400

600

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

One Domain Two Domains Three Domains Five Domains

Throughput Mbps

Tim

e D

iffere

nce (

ms)

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

Worcester Polytechnic Institute29

Comparison of HTTP/2 vs HTTP/1.1

0.5 5 50-15%

-10%

-5%

0%

5%

10%

15%

20%

25%

30%

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

One Domain Two Domains Three Domains Five Domains

Throughput Mbps

Perc

ent

Incre

ase v

s H

TTP

/1.1

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

Worcester Polytechnic Institute30

Varying Capacity, 79ms of Delay

0.1 1 10 100

-10%

0%

10%

20%

30%

40%

50%

60%

70%

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

One Domain Two Domains Three Domains Five Domains

Throughput Mbps

Perc

ent

Incre

ase v

s H

TTP

/1.1

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

Worcester Polytechnic Institute31

One Domain HTTP/2 vs 5 Domains HTTP/1.1

0 10 20 30 40 50 600

5000

10000

15000

20000

25000

30000

35000

-5%

0%

5%

10%

15%

20%

25%

30%

35%

40%

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

Throughput Mbps

Page L

oad T

ime m

s

Perc

ent

Incre

ase f

or

HTTP

/2

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

Worcester Polytechnic Institute32

Increase In Performance for Increasing Domains in HTTP/2?

0.1 1 10 100-15%

-10%

-5%

0%

5%

10%

15%

20%

HTTP/2 Speed Increases For Increasing Domains79ms, No Loss

One Domain Two Domains Three Domains Five Domains

Throughput Mbps

Perc

ent

Impro

vem

ent

Over

Sin

gle

Dom

ain

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

Worcester Polytechnic Institute33

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

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

Worcester Polytechnic Institute34

Loss For HTTP/1.1 and HTTP/2

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

20000

40000

60000

80000

100000

120000

140000

Page Load Times With Varying Loss Rate79ms Delay, 5Mbps Throughput

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

Loss

Page L

oad T

ime (

ms)

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

Worcester Polytechnic Institute35

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