HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison ...

2 downloads 231 Views 946KB Size Report
efficiency of HTTP2 using measurement performance tools (Httpwatch), ... browsers are taking more than their share of network), and related to these large ...
HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison Ibrahim Z. Al-Sharif, Faculty Of Engineering, Islamic University, Gaza. [email protected]

Abstract After about one and half decade, new version of hyper text transfer protocol was finally released. This research will try to stand over the new additions to the new protocol HTTP2, We will focus on performance issues such as page load time, header size and size of response message, we will also explore the performance and efficiency of HTTP2 using measurement performance tools (Httpwatch), stable internet connection and Firefox browser -which enable HTTP2- to measure the performance.

Objectives  

Measure HTTP2.0 real performance. Compare with HTTP 1.1 and SPDY3.1.

1. Introduction In this section We will introduce brief background of Hyper Text Transferee Protocol (HTTP) as an entrance to address the following points: What is HTTP? Brief history of HTTP, What is SPDY Protocol? What's new in HTTP2? HTTP1.1 has been used to deliver web pages using multiple, persistent TCP connections for at least the past decade[1]. However, there are limits to this, if too many connections are used, it’s both counter-productive (leading to congestion events that hurt performance and the network), and it’s fundamentally unfair (because browsers are taking more than their share of network), and related to these large number of requests means a lot of duplicated data. These situation lead to do things like spiriting, data: in lining, domain shading and concatenation. These hacks are indications of underlying problems in the protocol itself. To solve such these problems, Google proposed and deployed a new transport for HTTP messages called SPDY, starting in 2009. SPDY adds a framing layer for multiplexing concurrent application level transfer over a single TCP connection[1]. It is already deployed by many popular websites such as Google, Facebook and Twitter and supported by browsers such as Chrome and Firefox. IETF standardizing a HTTP2 proposal that is heavily based on SPDY [2]. This is the second version of Hypertext Transfer Protocol, since HTTP1.1 which was standardized in RFC 2068 in 1997. HTTP2 has several contribution in different trends, such increase performance through decrease latency to improve page load speed in web browsers, and maintain high-level compatibility with HTTP1.1.

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison HTTP2 contributions come from the key differences to HTTP1.1, which archives these goals and we can conclude these differences as     

is binary, instead of textual. is fully multiplexed, instead of ordered and blocking. can therefore use one connection for parallelism. uses header compression to reduce overhead. allows servers to “push” responses proactively into client caches.

HTTP/2 is currently available in Firefox and Chrome for testing, using the “h2-14” protocol identifier. There are also several servers available (including a test server from Akamai, Google and Twitter’s main sites). In section we will explain the methodology we have been follow to setup our experiments, in section 3 we will introduce our measurements with comments, in section 4 we will talk about related works, in section 5 we will talk about future work, and finally in section 6 we will introduce our conclusion.

2. Methods To setup our experiment environment We use Firefox 37.0.1 which support HTTP2 , and Httpwatch to monitor network performance, and take our measurements of loading Google main page (www.google.co.uk/) because of supporting HTTP2 on Google servers. To ensure of our measurements, We disable HTTP2 and SPDY on the Firefox browser, then take 4 measurements to the same page for text/html and image transfer, and between every measure We reset the browser and clear cache and cookies. Finally We take the best reading from the four readings. Second We enabled SPDY on Firefox and ensure that HTTP2 is disabled , then We repeated the same steps as above. Finally, We enabled HTTP2 on Firefox then repeated the same steps as above.

3. Measurements: All measurements are for the same site and the same textual and image resource.  Sent and Received Message Size for textual and image resources: HTTP1.1 textual resource sent message size is 290 bytes, Textual resource received message is 32,397 bytes, Image resource sent message is 541 bytes and Image resource received message is 16,562 bytes, as shown in table(1).

Table(1): HTTP1.1 sent and received message size for both textual and image resources respectively.

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison SPDY3.1 textual resource sent message size is 347 bytes, Textual resource received message size is 31,976 bytes, Image resource sent message size is 600 bytes and Image resource received message size is 16,349 bytes, as shown in table(2) below. .

Table(2): SPDY3.1 sent and received message for both textual and image resources respectively.

for HTTP2.0 we take two measurements here, because we take always the best measurement of textual and image resource for each protocol, but in out HTTP2.0 measurements we have the best textual measurement and the best image measurement in different times. First measure states that: HTTP2 Textual resource sent message size is 154 bytes, Textual resource received message size is 32,391 bytes, Image resource sent message is 260 bytes and Image resource received message is 16,280 bytes, as shown in table(3) below.

Table(3): HTTP2.0 sent and received message for both textual and image resources respectively.

The second measure states that: Textual resource sent message size is 154 bytes, Textual resource received message size 32,267 bytes, Image resource sent message size is 260 bytes and Image resource received message size is 16,373 bytes, as shown in table(4) below.

Table(4): HTTP2.0 sent and received message for both textual and image resources respectively.

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison Figure (1) below shows the comparison of sent message size for textual and image resource between HTTP1.1, SPDY3.1 and HTTP2 protocols. HTTP2 has the minimum sent message size for both textual and image resource, the difference is about 50% of the message size.

Sent massage size for both textual and image resources Sent Massage (Bytes) 600

541 347

260

290

154

Image

Image

Image

HTTP2

SPDY3.1

HTTP1.1

Text/HTML Text/HTML Text/HTML HTTP2

SPDY3.1

HTTP1.1

Figure(1): Textual and image resources sent message size for HTTP1.1, SPDY3.1 and HTTP2 protocols.

Figure (2) below shows the comparison of received message size for textual and image resource between HTTP1.1, SPDY3.1 and HTTP2 protocols. HTTP2 has the minimum received message size for image resource, but nearly the same as HTTP1.1 and more than SPDY3.1 for textual resource.

Received massage size for both textual and image resources Received Message (Bytes) 32,391 16,280

16,349

31,976

32,397

16,562

Image

Image

Image

HTTP2

SPDY3.1

HTTP1.1

Text/HTML Text/HTML Text/HTML HTTP2

SPDY3.1

HTTP1.1

Figure(2): Textual and image resources received message size for HTTP1.1, SPDY3.1 and HTTP2 protocols.

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison  Request and Response Headers Size for textual resources: In order to measure the header size, we search for (204 result) which means that no contents were return.. HTTP1.1 sent and received header for textual resources, sent header size for textual resource is 602 bytes, received header size for textual resource is 234 bytes, as shown in table(5).

Table(5): HTTP1.1 sent and received header for textual resources.

SPDY3.1 sent and received header for textual resources, sent header size for textual resource is 659 bytes, received header size for textual resource is 65 bytes, as shown in table(6).

Table(6): SPYD3.1 sent and received header for textual resources.

HTTP2 sent and received header for textual resources, sent header size for textual resource is 90 bytes, received header size for textual resource is 51 bytes, as shown in table(7).

Table(7): HTTP2 sent and received header for textual resources.

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison Figure (3) below shows the comparison of request and response header size for textual recourse between HTTP1.1, SPDY3.1 and HTTP2 protocols. HTTP2 has a big difference in request header size (about 700% less than others), less than HTTP1.1 by 500% and less than SPDY3.1 by about 20%, that is because HTTP1.1 does not use compression in headers, SPDY3.1 use DEFLATE and HTTP2 use HPACK .

700 600 500 400 300 200 100 0 Request header size Response header size

HTTP2 90

SPDY3.1 659

HTTP1.1 602

51

65

234

size (bytes)

Request and response headers size for textual resources

Figure(3): Textual resources request and response header size for HTTP1.1, SPDY3.1 and HTTP2 protocols.

 TCP Connects and SSL Handshakes Required During Page Load: HTTP1.1 creates 7 TCP connections to load Google main page, may more than one TCP connection for the same host, as shown in table(8).

Table(8): HTTP1.1 number of TCP connections

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison SPDY3.1 creates 3 TCP connections to load Google main page, SPDY3.1 use multiplexing to reduce the number of TCP connections, as shown in table(9).

Table(9): SPYDY3.1 number of TCP connections

HTTP2 creates 4 TCP connections to load Google main page, HTTP2 use multiplexing to reduce the number of TCP connections, as shown in table(10).

Table(10): HTTP2 number of TCP connections

Figure (4) below shows the comparison number of TCP connections for HTTP1.1, SPDY3.1 and HTTP2 protocols.HTTP2 and SPDY3.1 reduce the number of TCP connections by using multiplexing.

No. Connections 7 6 5 4 3 2 1 0 No. Connections

HTTP2 4

SPDY3.1 3

HTTP1.1 7

Figure(4): number of TCP connections comparison

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison 

Page Load Time: HTTP1.1 takes 5.551 seconds to completely load Google main page, as shown below in table(11).

Table(11): HTTP1.1 page load time

SPDY3.1 takes 4.049 seconds to completely load Google main page, as shown below in table(12).

Table(12): SPDY3.1 page load time.

HTTP2 takes 3.314 seconds to completely load Google main page, as shown below in table(13).

Table(13): HTTP2 page load time

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison

Figure (5) below shows the comparison of page load time for HTTP1.1, SPDY3.1 and HTTP2 protocols.HTTP2 is faster than SPDY3.1 and HTTP1.1 even if the response message size of HTTP2 was larger than SPDY3.1 response message size, this speed may due to different reasons, one of them we notice is the big difference in header size between HTTP2 and others.

Page Load Time (s) 6 4 Page Load Time (s)

2 0 HTTP2.0

SPDY3.1

HTTP1.1

Figure(5): page load time comparison

4. Related Works This topic is new, HTTP2 was released few months before so no real papers or researches was published yet, Httpwatch web site published a simple comparison between draft HTTP2, SPDY and HTTP1.1 and concluded that HTTP/2 is likely to provide significant performance advantages compared to raw HTTPS and even SPDY. However the use of padding in response messages is an area of potential concern where there could be a tradeoff between performance and security.[]

5. Future Work: Using other meters such as jmeter to prove our conclusion, and get more measurements for other protocol's features.

7. Conclusion: HTTP2 has performance advantages when compared to HTTP1.1 and SPDY3.1, It has about 50% sent message size reduction for both textual and image resources, about 600% reduction in header size, less TCP connections, and the less time to completely load the page.

HTTP 1.1 ,SPDY3.1 And HTTP2 Protocols Performance Comparison References: 1. Bin Swen, "Outline of initial design of the Structured Hypertext Transfer Protocol". May 2003. 2. 3. 4. 5.

Patrick Chang, "Fundamentals of HTTP".Updated January 09 2008. Network Working Group," Hypertext Transfer Protocol -- HTTP/1.1", June.1999. Tim Berners-Lee. "The Original HTTP as defined in 1991". World Wide Web Consortium. Retrieved 24 July 2010. Thomson, M. (ed. ), Belshe M. and R. Peon. "Hypertext Transfer Protocol version 2 - draft-ietf-httpbis-http2-16". ietf.org. HTTPbis Working Group. Retrieved 11 February 2015. 6. Chapter 12. HTTP 2.0". O'Reilly Media, Inc. Retrieved 19 March 2014.

Suggest Documents