<<

University of New Hampshire University of New Hampshire Scholars' Repository

Student Research Projects Student Scholarship

2014

SPDY vs HTTP/1.1: An Empirical Evaluation of Network Protocol Performance

Stephen Matthew Chambers University of New Hampshire - Main Campus

Follow this and additional works at: ://scholars.unh.edu/student_research

Part of the OS and Networks Commons

Recommended Citation Chambers, Stephen Matthew, "SPDY vs HTTP/1.1: An Empirical Evaluation of Network Protocol Performance" (2014). Student Research Projects. 5. https://scholars.unh.edu/student_research/5

This Undergraduate Research Project is brought to you for free and open access by the Student Scholarship at University of New Hampshire Scholars' Repository. It has been accepted for inclusion in Student Research Projects by an authorized administrator of University of New Hampshire Scholars' Repository. For more information, please contact [email protected]. SPDY? Not So Fast!

Author: Stephen Chambers Advisor: Radim Bartos Department: Computer Science Background Experimental Setup v As the evolves, the reduction of page Anue Network Emulator load time has an increased importance. v The should be changed to Client Emulated Network avoid altering existing implementations. Client Server Chrome v Latency Apache v. 2.2.22 v SPDY is a Google proprietary protocol that is v. 34.0.1847.116 v Periodic Packet Loss mod_spdy v. 3.0 deployed in the production environment Network already on such as Google, Emulator , and .

v SPDY is the working base for HTTP/2.0. v Client requested a web page with 100 small image files totaling ~ 3.4MB. v PHP script used to generate distinct pages in order to avoid content caching. Server Why change? v Presented results are averages of 5 runs. High Latency, Zero Packet Loss . Time to Load Page Bytes Transferred HTTP SPDY 4,400,000 3.500 4,300,000 3.000 4,200,000 v HTTP uses multiple v over a 2.500 4,100,000 2.000 4,000,000 HTTP Throughput and Page Load Time HTTP 3,900,000 1.500 SPDY connections because single connection. SPDY 3,800,000 1.000 3,700,000 0.500 3,600,000 Throughput (MB/s) Page load time (s) it can only process 0.000 3,500,000 0 20 40 60 80 100 120 140 0 20 40 60 80 100 120 140 HTTP HTTP SPDY 100 SPDY requests in a FIFO 10 16 14 1 queue. Throughput Percentage Increase 12 10 0.1 18000000 16% 8 16000000 14% 6 v Only the client can v Server push/Server 4 0 14000000 12% 2 12000000 10% 0 2 10000000 HTTP 8% 0 4 initiate a request. hint: Server can either % Increase 8000000 SPDY 6% 2 Packet loss rate 6000000 6 40 4% 0 5 4 (%) 30 35 4000000 10 6 Packet loss rate 8 25 2% 15 20 15 20 suggest a resource to 2000000 25 8 (%) 5 10 0% Network latency 30 35 10 0 Network latency 0 0 20 40 60 80 100 120 140 40 10 request or push the 0 20 40 60 80 100 120 140 -2% (ms) (ms) request to the client High Latency, Zero Packet Loss unsolicited. Time to Load Page Bytes Transferred Analysis 4 4,300,000 3.5 4,200,000 3 v 4,100,000 In a high latency network with zero packet loss, SPDY 2.5 v Sends static header v Removes static 2 HTTP 4,000,000 HTTP SPDY 1.5 SPDY 3,900,000 outperforms HTTP in terms of throughput as it takes 1 data throughout information, such as 3,800,000 0.5 advantage of SPDY’s multiplexing. 0 3,700,000 connection. the User-Agent and 0% 2% 4% 6% 8% 10% 12% 0% 2% 4% 6% 8% 10% 12% Host headers. v In a high packet loss network with near zero latency, Throughput Percentage Increase 200% 18000000 SPDY outperforms HTTP. Very small latency masks 16000000 v v 14000000 150% Optional compression Forces header 12000000 packet loss problems, so SPDY can recover very quickly. 100% 10000000 HTTP 8000000 % Increase SPDY 50% encodings for data. compression. 6000000 4000000 0% 2000000 0% 2% 4% 6% 8% 10% 12% 0 v In a bad network with high packet loss and high latency, 0% 2% 4% 6% 8% 10% 12% -50% HTTP vs SPDY HTTP outperforms SPDY. HTTP can perform load High Latency, High Packet Loss balancing with its multiple connections. RTT! RTT! Time to Load Page Bytes Transferred

60 4,400,000 4,300,000 50 4,200,000 40 4,100,000 HTTP 30 HTTP Next Steps 4,000,000 SPDY SPDY 20 3,900,000 RTT! 10 3,800,000 Experiments are far from exhaustive. Different application 0 3,700,000 0% 2% 4% 6% 8% 10% 12% 0% 2% 4% 6% 8% 10% 12% types should be tested against; video files and dynamic

Throughput Percentage Increase content would take advantage of SPDY’s Server Push and

3,500,000 10% 0% 3,000,000 Server Hint features. -10% 0% 2% 4% 6% 8% 10% 12% 2,500,000 -20% RTT! 2,000,000 -30% HTTP -40% % Increase 1,500,000 SPDY -50% 1,000,000 -60% 500,000 -70%

0 -80% 0% 2% 4% 6% 8% 10% 12% -90%