SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
Web Requests, Down To The Atom
Chris Zacharias
Web Unleashed 2019
Toronto
Understanding how the Internet fundamentally works is important.
• Identify performance opportunities at every layer.
• Make smarter decisions around compression and optimization.
• Become be er at triaging and debugging network-related issues.
• Recognize potential a ack vectors and vulnerabilities.
• Understand when and where costs occur.
• Communicate be er with other engineers.
A web request begins with a URL.
What is it that I
want to request?
What kind of
request is it?
The URL answers three simple questions.
Where do I send the
request?
The URL answers three simple questions.
What kind of
request is it?
Where do I send the
request?
What is it that I
want to request?
Protocol Network Location Path and Query
GET /examples/treefrog.jpg?w=400 HTTP/1.1
Host: assets.imgix.net
User-Agent: curl/7.54.0
Accept: image/webp,*/*
Accept-Encoding: br,gzip,deflate
The browser builds an HTTP request out of the URL we provide.
Path and Query Protocol
Network Location
An HTTP GET request.
The request is sent out onto the Internet and (hopefully) we get a response.
Request Response
The
Internet
Network
Provider
InternetISPWiFi
The Internet is just a collection of networks that connect clients to servers.
LAN
Network
Provider
InternetISPWiFi
By “hopping" between networks, we can find our way to the right server.
LAN
To perform a request, we need a network connection, an IP address and a port.
The
Internet
35.101.45.27 151.101.146.208DNS
assets.imgix.net?
Port: 41256 Port: 80 (HTTP)
Once we have those things, we can establish a TCP connection.
35.101.45.27 151.101.146.208
Port: 41256 Port: 80 (HTTP)
TCP Handshake
DATA (GET /file.jpg)
DATA (200 OK)
DATA (Response)
ACK
TCP Teardown
Packets are sent between client and server to transfer data.
35.101.45.27 151.101.146.208
Port: 41256 Port: 80 (HTTP)
TCP Handshake
DATA (GET /file.jpg)
DATA (200 OK)
DATA (Response)
ACK
TCP Teardown
The connection is shut down when it is no longer needed.
35.101.45.27 151.101.146.208
Port: 41256 Port: 80 (HTTP)
TCP Handshake
DATA (GET /file.jpg)
DATA (200 OK)
DATA (Response)
ACK
TCP Teardown
To describe the networking stack,
we make use of abstract models.
TCP / IP Model
Application HTTP
Transport TCP
Internet IP
Network Access Ethernet
This is the most common understanding of the network stack.
TCP / IP Model
Application GET, POST…
Transport :8080
Internet 35.64.132.7
Network Access 86:e9:fb:56:33:21
This is the most common understanding of the network stack.
TCP / IP Model
Application Data
Transport Sequences
Internet Packets
Network Access
Frames
Bits
This is the most common understanding of the network stack.
OSI Model TCP / IP Model
Application
Application DataPresentation
Session
Transport Transport Sequences
Network Internet Packets
Data Link
Network Access
Frames
Physical Bits
The OSI model is often used to talk about networking in the abstract.
You may frequently hear about features being “L7”, “L4”, etc.
OSI Model TCP / IP Model
Layer 7 Application
Application DataLayer 6 Presentation
Layer 5 Session
Layer 4 Transport Transport Sequences
Layer 3 Network Internet Packets
Layer 2 Data Link
Network Access
Frames
Layer 1 Physical Bits
Given that the Internet is stateless, we need to
provide a lot of extra information with our request.
The data in a web request is encoded as a stream of bytes.
G E T / e x a m p l e s / t r e e f r o g . j p g ? w = 4 0 0 H T T P / 1 .
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
1 r n H o s t : a s s e t s . i m g i x . n e t r n U s e r - A g e n t : c
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
u r l / 7 . 5 4 . 0 r n A c c e p t : i m a g e / w e b p , * / * r n A c c e
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
p t - E n c o d i n g : b r , g z i p , d e f l a t e r n r n
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
The stream is broken apart into chunks.
G E T / e x a m p l e s / t r
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
t r n U s e r - A g e n t : c
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
/ * r n A c c e p t - E n c o d
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
l a t e r n r n
144 145 146 147 148 149 150 151
e e f r o g . j p g ? w = 4 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
H T T P / 1 . 1 r n H o s t :
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
a s s e t s . i m g i x . n e
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
u r l / 7 . 5 4 . 0 r n A c c e
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
p t : i m a g e / w e b p , *
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
i n g : b r , g z i p , d e f
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
Those chunks are given IDs to keep them in order.
G E T / e x a m p l e s / t r
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
t r n U s e r - A g e n t : c
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
/ * r n A c c e p t - E n c o d
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
l a t e r n r n
144 145 146 147 148 149 150 151
e e f r o g . j p g ? w = 4 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
H T T P / 1 . 1 r n H o s t :
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
a s s e t s . i m g i x . n e
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
u r l / 7 . 5 4 . 0 r n A c c e
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
p t : i m a g e / w e b p , *
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
i n g : b r , g z i p , d e f
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
SEQ 0 SEQ 16
SEQ 32 SEQ 48
SEQ 64 SEQ 80
SEQ 96 SEQ 112
SEQ 128 SEQ 144
The chunks need to be packaged for sending across the Internet.
Application
Sequence G E T / e x a m p l e s / t r Data
The TCP headers are added to handle the connection between two hosts.
Application
Sequence G E T / e x a m p l e s / t r
Transport Application
Ports Sequence G E T / e x a m p l e s / t r
Data
Sequence
The IP headers provide the necessary context to navigate the Internet.
Application
Sequence G E T / e x a m p l e s / t r
Transport Application
Ports Sequence G E T / e x a m p l e s / t r
Internet Transport Application
IPs Ports Sequence G E T / e x a m p l e s / t r
Data
Sequence
Packet
Application
Sequence G E T / e x a m p l e s / t r
Transport Application
Ports Sequence G E T / e x a m p l e s / t r
Internet Transport Application
IPs Ports Sequence G E T / e x a m p l e s / t r
Network Internet Transport Application
MAC/LLC IPs Ports Sequence G E T / e x a m p l e s / t r
Data
Sequence
Packet
Frame
The MAC/LLC headers manage how packets navigate the local network.
The MAC/LLC headers manage how packets navigate the local network.
Application
Sequence G E T / e x a m p l e s / t r
Transport Application
Ports Sequence G E T / e x a m p l e s / t r
Internet Transport Application
IPs Ports Sequence G E T / e x a m p l e s / t r
Network Internet Transport Application
MAC/LLC IPs Ports Sequence G E T / e x a m p l e s / t r
Data
Sequence
Packet
Frame
The standard “MTU” or Maximum Transmission Unit is 1526 bytes.
To understand how data is sent over a physical wire,
we are going to work backwards from the atom.
Electrically conductive atoms have a single electron in their outermost shell.
By adding poles with positive and negative charges…
+-
… we cause the atoms nearest to the positive pole to lose an electron.
+-
Atoms missing an electron pull electrons from other atoms.
+-
The negative pole provides electrons to atoms that end up without one.
+-
This creates an electrical current.
+-
In direct current, electrons flow in one direction at a rate known as voltage.
A higher voltage means more electrons are flowing in the current.
The voltage can be made to vary over time.
A measurement of the voltage is taken regularly on a clock cycle.
By thresholding the voltages to discrete values, we can derive bits.
1 1 10 0 0
Numbers, text and other data can be translated into and out of bits.
01011010 = “Z”01011010 = 90
0 1 0 1 1 0 1 0
27 26 25 24 23 22 21 20
20 * 0 = 0
21 * 1 = 2
22 * 0 = 0
23 * 1 = 8
24 * 1 = 16
25 * 0 = 0
26 * 1 = 64
27 * 0 = 0
+ 90
Over 2 TRILLION GIGABYTES of data will be
transmitted over the Internet in 2020.
It will take a lot of electricity to
transit that much data.
https://www.nature.com/articles/d41586-018-06610-y
Carbon emissions due to the
Internet surpassed those of the
airline industry in 2015.
https://www.theguardian.com/environment/2015/sep/25/server-data-centre-emissions-air-travel-web-google-facebook-greenhouse-gas
Do your part. Use fewer bytes.
Thank you.
Chris Zacharias
chris@imgix.com
@zacman85

Mais conteúdo relacionado

Semelhante a Web Requests, Down To The Atom

Introduction to Java Profiling
Introduction to Java ProfilingIntroduction to Java Profiling
Introduction to Java ProfilingJerry Yoakum
 
Hacking the kodak funsaver flash
Hacking the kodak funsaver flashHacking the kodak funsaver flash
Hacking the kodak funsaver flashMechEProdigy
 
Thinh phat 02-01-2014
Thinh phat 02-01-2014Thinh phat 02-01-2014
Thinh phat 02-01-2014Lãng Quên
 
Thinh phat 02-01-2014
Thinh phat 02-01-2014Thinh phat 02-01-2014
Thinh phat 02-01-2014Peter Tran
 
Jaimin chp-5 - network layer- 2011 batch
Jaimin   chp-5 - network layer- 2011 batchJaimin   chp-5 - network layer- 2011 batch
Jaimin chp-5 - network layer- 2011 batchJaimin Jani
 
21 handling & installation of cables
21   handling & installation of cables21   handling & installation of cables
21 handling & installation of cablesFelix Maikol
 
7.2.1.8 lab using wireshark to observe the tcp 3-way handshake
7.2.1.8 lab   using wireshark to observe the tcp 3-way handshake7.2.1.8 lab   using wireshark to observe the tcp 3-way handshake
7.2.1.8 lab using wireshark to observe the tcp 3-way handshakegabriel morillo
 
Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...
Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...
Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...Jean-Paul Calbimonte
 
Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...
Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...
Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...Flink Forward
 
Self-managed and automatically reconfigurable stream processing
Self-managed and automatically reconfigurable stream processingSelf-managed and automatically reconfigurable stream processing
Self-managed and automatically reconfigurable stream processingVasia Kalavri
 
Ccm mechanical design-presentation
Ccm mechanical design-presentationCcm mechanical design-presentation
Ccm mechanical design-presentationRadi Nasr
 
RefreshDC - The How Of Geo
RefreshDC - The How Of GeoRefreshDC - The How Of Geo
RefreshDC - The How Of GeoAndrew Turner
 
0244 Panorama I UPS Testing
0244 Panorama I UPS Testing0244 Panorama I UPS Testing
0244 Panorama I UPS TestingJoe Tate
 
VG-1036_USYD_CITY_ROAD_2D_ES-Zone1
VG-1036_USYD_CITY_ROAD_2D_ES-Zone1VG-1036_USYD_CITY_ROAD_2D_ES-Zone1
VG-1036_USYD_CITY_ROAD_2D_ES-Zone1Michael A Twohig
 
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docxHW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docxwellesleyterresa
 

Semelhante a Web Requests, Down To The Atom (20)

DB Cable
DB CableDB Cable
DB Cable
 
Introduction to Java Profiling
Introduction to Java ProfilingIntroduction to Java Profiling
Introduction to Java Profiling
 
Hacking the kodak funsaver flash
Hacking the kodak funsaver flashHacking the kodak funsaver flash
Hacking the kodak funsaver flash
 
Thinh phat 02-01-2014
Thinh phat 02-01-2014Thinh phat 02-01-2014
Thinh phat 02-01-2014
 
Thinh phat 02-01-2014
Thinh phat 02-01-2014Thinh phat 02-01-2014
Thinh phat 02-01-2014
 
Jaimin chp-5 - network layer- 2011 batch
Jaimin   chp-5 - network layer- 2011 batchJaimin   chp-5 - network layer- 2011 batch
Jaimin chp-5 - network layer- 2011 batch
 
21 handling & installation of cables
21   handling & installation of cables21   handling & installation of cables
21 handling & installation of cables
 
7.2.1.8 lab using wireshark to observe the tcp 3-way handshake
7.2.1.8 lab   using wireshark to observe the tcp 3-way handshake7.2.1.8 lab   using wireshark to observe the tcp 3-way handshake
7.2.1.8 lab using wireshark to observe the tcp 3-way handshake
 
1 Network Intro
1 Network Intro1 Network Intro
1 Network Intro
 
Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...
Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...
Tutorial ESWC2011 Building Semantic Sensor Web - 04 - Querying_semantic_strea...
 
Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...
Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...
Self Managed and Automatically Reconfigurable Stream Processing - Vasiliki Ka...
 
Self-managed and automatically reconfigurable stream processing
Self-managed and automatically reconfigurable stream processingSelf-managed and automatically reconfigurable stream processing
Self-managed and automatically reconfigurable stream processing
 
Ccm mechanical design-presentation
Ccm mechanical design-presentationCcm mechanical design-presentation
Ccm mechanical design-presentation
 
FAPESP_Beamer
FAPESP_BeamerFAPESP_Beamer
FAPESP_Beamer
 
RefreshDC - The How Of Geo
RefreshDC - The How Of GeoRefreshDC - The How Of Geo
RefreshDC - The How Of Geo
 
0244 Panorama I UPS Testing
0244 Panorama I UPS Testing0244 Panorama I UPS Testing
0244 Panorama I UPS Testing
 
Malik Ijaz CV
Malik Ijaz CVMalik Ijaz CV
Malik Ijaz CV
 
AES Encryption
AES EncryptionAES Encryption
AES Encryption
 
VG-1036_USYD_CITY_ROAD_2D_ES-Zone1
VG-1036_USYD_CITY_ROAD_2D_ES-Zone1VG-1036_USYD_CITY_ROAD_2D_ES-Zone1
VG-1036_USYD_CITY_ROAD_2D_ES-Zone1
 
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docxHW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
 

Web Requests, Down To The Atom

  • 1. Web Requests, Down To The Atom Chris Zacharias Web Unleashed 2019 Toronto
  • 2. Understanding how the Internet fundamentally works is important. • Identify performance opportunities at every layer. • Make smarter decisions around compression and optimization. • Become be er at triaging and debugging network-related issues. • Recognize potential a ack vectors and vulnerabilities. • Understand when and where costs occur. • Communicate be er with other engineers.
  • 3.
  • 4.
  • 5.
  • 6. A web request begins with a URL.
  • 7. What is it that I want to request? What kind of request is it? The URL answers three simple questions. Where do I send the request?
  • 8. The URL answers three simple questions. What kind of request is it? Where do I send the request? What is it that I want to request? Protocol Network Location Path and Query
  • 9. GET /examples/treefrog.jpg?w=400 HTTP/1.1 Host: assets.imgix.net User-Agent: curl/7.54.0 Accept: image/webp,*/* Accept-Encoding: br,gzip,deflate The browser builds an HTTP request out of the URL we provide. Path and Query Protocol Network Location An HTTP GET request.
  • 10. The request is sent out onto the Internet and (hopefully) we get a response. Request Response The Internet
  • 11. Network Provider InternetISPWiFi The Internet is just a collection of networks that connect clients to servers. LAN
  • 12. Network Provider InternetISPWiFi By “hopping" between networks, we can find our way to the right server. LAN
  • 13. To perform a request, we need a network connection, an IP address and a port. The Internet 35.101.45.27 151.101.146.208DNS assets.imgix.net? Port: 41256 Port: 80 (HTTP)
  • 14. Once we have those things, we can establish a TCP connection. 35.101.45.27 151.101.146.208 Port: 41256 Port: 80 (HTTP) TCP Handshake DATA (GET /file.jpg) DATA (200 OK) DATA (Response) ACK TCP Teardown
  • 15. Packets are sent between client and server to transfer data. 35.101.45.27 151.101.146.208 Port: 41256 Port: 80 (HTTP) TCP Handshake DATA (GET /file.jpg) DATA (200 OK) DATA (Response) ACK TCP Teardown
  • 16. The connection is shut down when it is no longer needed. 35.101.45.27 151.101.146.208 Port: 41256 Port: 80 (HTTP) TCP Handshake DATA (GET /file.jpg) DATA (200 OK) DATA (Response) ACK TCP Teardown
  • 17. To describe the networking stack, we make use of abstract models.
  • 18. TCP / IP Model Application HTTP Transport TCP Internet IP Network Access Ethernet This is the most common understanding of the network stack.
  • 19. TCP / IP Model Application GET, POST… Transport :8080 Internet 35.64.132.7 Network Access 86:e9:fb:56:33:21 This is the most common understanding of the network stack.
  • 20. TCP / IP Model Application Data Transport Sequences Internet Packets Network Access Frames Bits This is the most common understanding of the network stack.
  • 21. OSI Model TCP / IP Model Application Application DataPresentation Session Transport Transport Sequences Network Internet Packets Data Link Network Access Frames Physical Bits The OSI model is often used to talk about networking in the abstract.
  • 22. You may frequently hear about features being “L7”, “L4”, etc. OSI Model TCP / IP Model Layer 7 Application Application DataLayer 6 Presentation Layer 5 Session Layer 4 Transport Transport Sequences Layer 3 Network Internet Packets Layer 2 Data Link Network Access Frames Layer 1 Physical Bits
  • 23. Given that the Internet is stateless, we need to provide a lot of extra information with our request.
  • 24. The data in a web request is encoded as a stream of bytes. G E T / e x a m p l e s / t r e e f r o g . j p g ? w = 4 0 0 H T T P / 1 . 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 r n H o s t : a s s e t s . i m g i x . n e t r n U s e r - A g e n t : c 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 u r l / 7 . 5 4 . 0 r n A c c e p t : i m a g e / w e b p , * / * r n A c c e 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 p t - E n c o d i n g : b r , g z i p , d e f l a t e r n r n 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
  • 25. The stream is broken apart into chunks. G E T / e x a m p l e s / t r 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 t r n U s e r - A g e n t : c 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 / * r n A c c e p t - E n c o d 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 l a t e r n r n 144 145 146 147 148 149 150 151 e e f r o g . j p g ? w = 4 0 0 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 H T T P / 1 . 1 r n H o s t : 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 a s s e t s . i m g i x . n e 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 u r l / 7 . 5 4 . 0 r n A c c e 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 p t : i m a g e / w e b p , * 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 i n g : b r , g z i p , d e f 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
  • 26. Those chunks are given IDs to keep them in order. G E T / e x a m p l e s / t r 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 t r n U s e r - A g e n t : c 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 / * r n A c c e p t - E n c o d 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 l a t e r n r n 144 145 146 147 148 149 150 151 e e f r o g . j p g ? w = 4 0 0 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 H T T P / 1 . 1 r n H o s t : 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 a s s e t s . i m g i x . n e 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 u r l / 7 . 5 4 . 0 r n A c c e 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 p t : i m a g e / w e b p , * 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 i n g : b r , g z i p , d e f 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 SEQ 0 SEQ 16 SEQ 32 SEQ 48 SEQ 64 SEQ 80 SEQ 96 SEQ 112 SEQ 128 SEQ 144
  • 27. The chunks need to be packaged for sending across the Internet. Application Sequence G E T / e x a m p l e s / t r Data
  • 28. The TCP headers are added to handle the connection between two hosts. Application Sequence G E T / e x a m p l e s / t r Transport Application Ports Sequence G E T / e x a m p l e s / t r Data Sequence
  • 29. The IP headers provide the necessary context to navigate the Internet. Application Sequence G E T / e x a m p l e s / t r Transport Application Ports Sequence G E T / e x a m p l e s / t r Internet Transport Application IPs Ports Sequence G E T / e x a m p l e s / t r Data Sequence Packet
  • 30. Application Sequence G E T / e x a m p l e s / t r Transport Application Ports Sequence G E T / e x a m p l e s / t r Internet Transport Application IPs Ports Sequence G E T / e x a m p l e s / t r Network Internet Transport Application MAC/LLC IPs Ports Sequence G E T / e x a m p l e s / t r Data Sequence Packet Frame The MAC/LLC headers manage how packets navigate the local network.
  • 31. The MAC/LLC headers manage how packets navigate the local network. Application Sequence G E T / e x a m p l e s / t r Transport Application Ports Sequence G E T / e x a m p l e s / t r Internet Transport Application IPs Ports Sequence G E T / e x a m p l e s / t r Network Internet Transport Application MAC/LLC IPs Ports Sequence G E T / e x a m p l e s / t r Data Sequence Packet Frame The standard “MTU” or Maximum Transmission Unit is 1526 bytes.
  • 32. To understand how data is sent over a physical wire, we are going to work backwards from the atom.
  • 33. Electrically conductive atoms have a single electron in their outermost shell.
  • 34. By adding poles with positive and negative charges… +-
  • 35. … we cause the atoms nearest to the positive pole to lose an electron. +-
  • 36. Atoms missing an electron pull electrons from other atoms. +-
  • 37. The negative pole provides electrons to atoms that end up without one. +-
  • 38. This creates an electrical current. +-
  • 39. In direct current, electrons flow in one direction at a rate known as voltage.
  • 40. A higher voltage means more electrons are flowing in the current.
  • 41. The voltage can be made to vary over time.
  • 42. A measurement of the voltage is taken regularly on a clock cycle.
  • 43. By thresholding the voltages to discrete values, we can derive bits. 1 1 10 0 0
  • 44. Numbers, text and other data can be translated into and out of bits. 01011010 = “Z”01011010 = 90 0 1 0 1 1 0 1 0 27 26 25 24 23 22 21 20 20 * 0 = 0 21 * 1 = 2 22 * 0 = 0 23 * 1 = 8 24 * 1 = 16 25 * 0 = 0 26 * 1 = 64 27 * 0 = 0 + 90
  • 45. Over 2 TRILLION GIGABYTES of data will be transmitted over the Internet in 2020.
  • 46. It will take a lot of electricity to transit that much data. https://www.nature.com/articles/d41586-018-06610-y
  • 47. Carbon emissions due to the Internet surpassed those of the airline industry in 2015. https://www.theguardian.com/environment/2015/sep/25/server-data-centre-emissions-air-travel-web-google-facebook-greenhouse-gas
  • 48. Do your part. Use fewer bytes.
  • 49.