08/07/2017

Book Summary 02: High Performance Browser Networking - Part3 (HTTP)

Last year I started to read this nice book "High Performance Browser Networking", which I really love its slogan "What every web developer should know about Networking and Browser Performance!". So I did part 1 summary first 4 chapters - Networking 101. Then I jumped to part 3 - HTTP, and I did highlight the important points to summaries it, but unfortunately I didn't have time to write it down.

About The Book:

  • Name: High Performance Browser Networking.
  • Author: Ilya Grigorik - Web performance engineer and developer advocate on the Make The Web Fast team at Google.
  • Description: 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.

Part3 - HTTP (CH 9-13)

Ch13. Optimizing application delivery.

  • You have control over certain parts like server side stuff, but not the client or the network between both sides, so do your best on that area.
  • Physics is always limited! The connection is limited by speed of light, distance between 2 sides, and the medium.
  • Latency is a main player.
  • Apart if physical limitations, you should always use latest pest practices of TCP and LTS.
  • Then we move up to application layer "HTTP", there are 3 important things:
    • Work around the limitations of HTTP 1.x.
    • Learn how to levarage new performance enhancements in HTTP 2.0.
    • Vigilant about applying the evergreen performance best practices.
  • Evergreen performance best practices (you need to search and read more about each point):
    • Reduce DNS lookups.
    • Reuse TCP connections.
    • Minimize number of HTTP redirects.
    • Reduce roundtrip times (e.g. use CDN).
    • Eliminate unnecessary resources.
    • Cache resources on the client.
    • Compress assets during transfer.
    • Eliminate unnecessary request bytes.
    • Parallelize request and response processing.
  • Help the browser, it helps you. Try to provide a hints and don't hide resources to/from the browser (check Browser optimization section).
  • HTTP 1.x optimizations:
    • Leverage HTTP pipelining - in case you have control over both sides client and server you can make it better.
    • Apply domain sharding - split the resources over more than 1 domain to avoid http parallel connection limit.
    • Bundle resources to reduce HTTP requests - less round trips means better performance, so make less requests.
    • Inline small resources - no connections is better than less connections, so embedding small resources in the main document could save a lot of time.
    • Best performance tweak for HTTP 1.x? Upgrade to HTTP 2.0!
  • HTTP 2.0 optimizations. As you see, HTTP 1.x has a big issue with transport performance and which reflects on latency and throughput.
  • Remove HTTP 1.x optimizations - surprise! All tweaks for HTTP 1.x are bad for HTTP 2.0, get rid of them!
    • Minimize any bundling like image spriting, and JS files.
    • Use server push and void inline resources, so you can get use of caching for all resources.
    • Consolidate as many resources to a single domain.
Powered by Blogger.

Hello, my name is Ahmed AbouZaid, I'm a passionate Tech Lead DevOps Engineer. 👋

With 16+ years of open-source contributions, 12+ years of professional hands-on experience in DevOps, and an M.Sc. in Data Engineering from Edinburgh Napier University (UK), I enjoy facilitating the growth of both businesses and individuals.

I specialize in Cloud-Native and Kubernetes. I'm also a Free/Open source geek and book author. My favorite topics are DevOps transformation, automation, data, and metrics.

Contact Me

Name

Email *

Message *

Start Your DevOps Engineer Journey!

Start Your DevOps Engineer Journey!
Start your DevOps career for free the Agile way in 2024 with the Dynamic DevOps Roadmap ⭐

Latest Post

2023 Highlights

Image generated with Craiyon . Finally, 2023 is over! What a year! One more crazy year, but it was the culmination ...

Popular Posts

Blog Archive