High Performance Browser Networking: What every web developer should know about networking and web performance

High Performance Browser Networking: What every web developer should know about networking and web performance

Ilya Grigorik

Language: English

Pages: 400

ISBN: 1449344763

Format: PDF / Kindle (mobi) / ePub

How prepared are you to build fast and efficient web applications? This eloquent book provides what every web developer should know about the network, from fundamental limitations that affect performance to major innovations for building even more powerful browser applications--including HTTP 2.0 and XHR improvements, Server-Sent Events (SSE), WebSocket, and WebRTC.

Author Ilya Grigorik, a web performance engineer at Google, demonstrates performance optimization best practices for TCP, UDP, and TLS protocols, and explains unique wireless and mobile network optimization requirements. You'll then dive into performance characteristics of technologies such as HTTP 2.0, client-side network scripting with XHR, real-time streaming with SSE and WebSocket, and P2P communication with WebRTC.

  • Deliver optimal TCP, UDP, and TLS performance
  • Optimize network delivery over 3G/4G mobile networks
  • Develop fast and energy-efficient mobile applications
  • Address bottlenecks in HTTP 1.x and other browser protocols
  • Plan for and deliver the best HTTP 2.0 performance
  • Enable efficient real-time streaming in the browser
  • Create efficient peer-to-peer videoconferencing and low-latency applications with real-time WebRTC transports



















matter the available bandwidth, every TCP connection must go through the slow-start phase—we cannot use the full capacity of the link immediately! Instead, we start with a small congestion window and double it for every roundtrip— i.e., exponential growth. As a result, the time required to reach a specific throughput 20 | Chapter 2: Building Blocks of TCP target is a function (Equation 2-1) of both the roundtrip time between the client and server and the initial congestion window size.

now, all the data has been exchanged in clear text with the exception of the new symmetric key that is encrypted with the server’s public key. 140 ms The server decrypts the symmetric key sent by the client, checks message integrity by verifying the MAC, and returns an encrypted “Finished” message back to the client. 168 ms The client decrypts the message with the symmetric key it generated earlier, verifies the MAC, and if all is well, then the tunnel is established and application data can

the insatiable demand for high-speed connectivity, ubiquitous wireless broadband access, and the connected services that must power all of these new devices! This is where, and why, we must turn our conversation to the performance of the various cellular technologies, such as GSM, CDMA, HSPA, and LTE. Chances are, most of your users will be using one of these technologies, some exclusively, to access your site or service. The stakes are high, we have to get this right, and mobile networks

within the past few years is a telltale sign of the growing importance and demand for speed and faster user experiences by the users. And this is not simply a psychological need for speed in our ever accelerating and connected world, but a requirement driven by empirical results, as measured with respect to the bottom-line performance of the many online businesses: • Faster sites lead to better user engagement. • Faster sites lead to better user retention. • Faster sites lead to higher

server is in London, and we are starting a new TCP connection over a fiber link, then the three-way handshake will take a mini‐ mum of 56 milliseconds (Table 1-1): 28 milliseconds to propagate the packet in one direction, after which it must return back to New York. Note that bandwidth of the connection plays no role here. Instead, the delay is governed by the latency between the client and the server, which in turn is dominated by the propagation time between New York and London. The delay

Download sample