SlideShare a Scribd company logo
Web Performance
Network Tips
Mykyta Semenistyi & Andrew Kovalenko
Table of contents
1. CDN
2. Domain Sharding
3. Cache
4. Data Formats
5. Browser Enhancements (prefetch, preload, navigation timing)
6. XHR
7. WebSockets
8. WebRTC
Latency
Ilya Grigorik: High Performance Browser Networking
CDNContent Delivery Network
http://www.wpbeginner.com/beginners-guide/why-you-need-a-cdn-for-your-wordpress-blog-infographic/?display=wide
CDNadvantages
1. Minimal latency
2. Crash resistance
3. Headers reduced
4. Caching for public CDNs
CDNjsDelivr
● lots of libraries
● open-source, you may send pull-request
● can combine requests
● serves js and css
● wide network
Domain Shardingmotivation
https://developers.google.com/speed/articles/web-metrics
Domain Shardingmotivation
<div class="row">
<div id="image-1" class="image"><img src="images/1.jpg"></div>
<div id="image-2" class="image"><img src="images/2.jpg"></div>
<div id="image-3" class="image"><img src="images/3.jpg"></div>
</div>
<div class="row">
<div id="image-4" class="image"><img src="images/4.jpg"></div>
<div id="image-5" class="image"><img src="images/5.jpg"></div>
<div id="image-6" class="image"><img src="images/6.jpg"></div>
</div>
}
2-6
conqequent
requests per
domain
<div class="row">
<div id="image-7" class="image"><img src="cdn.com/images/7.jpg"></div>
<div id="image-8" class="image"><img rsc="cdn.com/images/8.jpg"></div>
<div id="image-9" class="image"><img src="cdn.com/images/9.jpg"></div>
</div>
Domain Shardingsummary
● Use only 2 domains
● IP could be the same and only CNAME should be changed
● Measure everything by yourself: don’t forget about DNS resolve and TCP slow-start
● Sharding may not be quite good for mobile
Cacheheaders
cache-control expires etag (entity-
tag)
pragma vary
private, max-age=0,
no-cache
Thu, 01 Dec 1983 20:
00:00 GMT
User-Agent
http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/
no-cache
"123456789"
W/"123456789"
Data Formats
xml json custom format
<page>
<title>Title</title>
<id>1529</id>
<revision>
<id>4382</id>
<timestamp>2006-09-18T22:11:53
</timestamp>
</page>
{
"title": "Title",
"id": 1529,
"revision": 4382,
"timestamp":
"2006-09-18T22:11:53Z"
}
Title::1529::4382::
2006-09-18T22:11:53Z
New in Browsers
DNS preresolve TCP preconnect
<link rel="dns-prefetch" href="//host_name_to_prefetch.com">
Ilya Grigorik http://www.igvita.com/posa/high-performance-networking-in-google-chrome/#predictor
New in Browsers
prerefetch
Ilya Grigorik http://www.igvita.com/posa/high-performance-networking-in-google-chrome/#predictor
<link rel="subresource" href="/myapp.js">
<link rel="prefetch" href="/big.jpeg">
prerender
<link rel="prerender" href="http://site.org/index.html">
Navigation Timing
performance.timing
Resource Loading Strategies
Lazy-loading
➔ scripts
➔ images
➔ etc.
Pre-loading
XHR streaming
var myRequest = new XMLHttpRequest();
myRequest.onreadystatechange = function(){
//myRequest.readyState
}
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
Oboe.js
WebRTC Excitement
➔ Audio
➔ Video
➔ Real-time communication
➔ Peer-to-peer
➔ Custom data transfer
➔ Google, Mozilla и Opera
WebRTC
MediaStream RTCPeerConnection RTCDataChannel
acquisition of audio
and video streams
communication of
audio and video data
communication of
arbitrary application
data
WebRTC audio and video engines
Ilya Grigorik: High Performance Browser
Networking
WebRTC protocol stack
Ilya Grigorik: High Performance Browser
Networking
RTCPeerConnection API
WebRTC browser support scorecard
http://iswebrtcreadyyet.com/
WebRTC 4 All
webrtc4all is a WebRTC extension for Safari, Firefox, Opera and IE9+
Windows XP, Vista, 7 and 8 OS X Unix
Safari Yes coming soon coming soon
Firefox Yes coming soon coming soon
IE Yes coming soon coming soon
Opera Yes coming soon
coming soon

More Related Content

PDF
Engage 2013 - Multi Channel Data Collection
PDF
How to monitor MongoDB
PDF
Achieving Pci Compliace
PDF
2008 MySQL Conference Recap
PPTX
Александр Сергиенко, Senior Android Developer, DataArt
PPTX
Webinar: Architecting Secure and Compliant Applications with MongoDB
PDF
Container Security via Monitoring and Orchestration - Container Security Summit
PPTX
MongoDB Memory Management Demystified
Engage 2013 - Multi Channel Data Collection
How to monitor MongoDB
Achieving Pci Compliace
2008 MySQL Conference Recap
Александр Сергиенко, Senior Android Developer, DataArt
Webinar: Architecting Secure and Compliant Applications with MongoDB
Container Security via Monitoring and Orchestration - Container Security Summit
MongoDB Memory Management Demystified

What's hot (20)

PDF
Mongo performance tuning: tips and tricks
PDF
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
PDF
Cloud Hosted mongodb
PPT
5 things MySql
PPTX
Advance Java
PPTX
5 critical-optimizations.v2
PDF
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
PDF
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
PDF
Active Https Cookie Stealing
PDF
HTTP 완벽가이드- 13 다이제스트 인증
PDF
Drupal performance
KEY
Fluent plugin-dstat
PDF
Hidden gems in Apache Jackrabbit and BloomReach Forge
PDF
Drupal 8 Cache: Under the hood
PPTX
JSR107 Come, Code, Cache, Compute!
PPTX
Drupal 101: Tips and Tricks for Troubleshooting Drupal
PDF
Postgres connections at scale
PDF
WordPress Security 101: Essential Security Practices Simplified
PDF
Hosting huge amount of binaries in JCR
PDF
Back to Basics 2017: Mí primera aplicación MongoDB
Mongo performance tuning: tips and tricks
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
Cloud Hosted mongodb
5 things MySql
Advance Java
5 critical-optimizations.v2
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Active Https Cookie Stealing
HTTP 완벽가이드- 13 다이제스트 인증
Drupal performance
Fluent plugin-dstat
Hidden gems in Apache Jackrabbit and BloomReach Forge
Drupal 8 Cache: Under the hood
JSR107 Come, Code, Cache, Compute!
Drupal 101: Tips and Tricks for Troubleshooting Drupal
Postgres connections at scale
WordPress Security 101: Essential Security Practices Simplified
Hosting huge amount of binaries in JCR
Back to Basics 2017: Mí primera aplicación MongoDB
Ad

Similar to 2 network tips (20)

PPTX
PDF
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
PDF
Optimising Web Application Frontend
PPTX
High Availability Content Caching with NGINX
PPTX
Choosing A Proxy Server - Apachecon 2014
PPT
Generating the Server Response: HTTP Status Codes
PDF
High Availability Content Caching with NGINX
PDF
SPDY - http reloaded - WebTechConference 2012
PPTX
Honing headers for highly hardened highspeed hypertext
PPTX
Honing headers for highly hardened highspeed hypertext
PDF
Build Better Responsive websites. Hrvoje Jurišić
PDF
Using NGINX as an Effective and Highly Available Content Cache
PDF
Optimizing Your Frontend Performance
PDF
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
PDF
Clug 2012 March web server optimisation
PDF
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
PDF
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
PDF
KSDG-iSlide App 開發心得分享
PDF
ITB2017 - Nginx Effective High Availability Content Caching
PPTX
Progressive downloads and rendering (Stoyan Stefanov)
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Optimising Web Application Frontend
High Availability Content Caching with NGINX
Choosing A Proxy Server - Apachecon 2014
Generating the Server Response: HTTP Status Codes
High Availability Content Caching with NGINX
SPDY - http reloaded - WebTechConference 2012
Honing headers for highly hardened highspeed hypertext
Honing headers for highly hardened highspeed hypertext
Build Better Responsive websites. Hrvoje Jurišić
Using NGINX as an Effective and Highly Available Content Cache
Optimizing Your Frontend Performance
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
Clug 2012 March web server optimisation
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
KSDG-iSlide App 開發心得分享
ITB2017 - Nginx Effective High Availability Content Caching
Progressive downloads and rendering (Stoyan Stefanov)
Ad

More from Binary Studio (20)

PPTX
Academy PRO: D3, part 3
PPTX
Academy PRO: D3, part 1
PPTX
Academy PRO: Cryptography 3
PPTX
Academy PRO: Cryptography 1
PPTX
Academy PRO: Advanced React Ecosystem. MobX
PPTX
Academy PRO: Docker. Part 4
PPTX
Academy PRO: Docker. Part 2
PPTX
Academy PRO: Docker. Part 1
PPTX
Binary Studio Academy 2017: JS team project - Orderly
PPTX
Binary Studio Academy 2017: .NET team project - Unicorn
PPTX
Academy PRO: React native - miscellaneous
PPTX
Academy PRO: React native - publish
PPTX
Academy PRO: React native - navigation
PPTX
Academy PRO: React native - building first scenes
PPTX
Academy PRO: React Native - introduction
PPTX
Academy PRO: Push notifications. Denis Beketsky
PPTX
Academy PRO: Docker. Lecture 4
PPTX
Academy PRO: Docker. Lecture 3
PPTX
Academy PRO: Docker. Lecture 2
PPTX
Academy PRO: Docker. Lecture 1
Academy PRO: D3, part 3
Academy PRO: D3, part 1
Academy PRO: Cryptography 3
Academy PRO: Cryptography 1
Academy PRO: Advanced React Ecosystem. MobX
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 1
Binary Studio Academy 2017: JS team project - Orderly
Binary Studio Academy 2017: .NET team project - Unicorn
Academy PRO: React native - miscellaneous
Academy PRO: React native - publish
Academy PRO: React native - navigation
Academy PRO: React native - building first scenes
Academy PRO: React Native - introduction
Academy PRO: Push notifications. Denis Beketsky
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 1

2 network tips