Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Web 200: Anatomy of a Request
Search
John Britton
December 09, 2012
Technology
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web 200: Anatomy of a Request
What happens when you press "Go" in your browser?
John Britton
December 09, 2012
More Decks by John Britton
See All by John Britton
Marketing to Developers
johndbritton
8
2.3k
Stories from the GitHub Classroom: Changing Practice, one Pull Request at a Time
johndbritton
3
650
Ops for Everyone
johndbritton
33
8.2k
GitHub: Distributed, Asynchronous, and Self-directed
johndbritton
4
440
P2PU at Campus Party Mexico 2011
johndbritton
2
290
Other Decks in Technology
See All in Technology
Kotlin 開発のツラミを爆破した話! / Explode the difficulty of Kotlin dev!
eller86
0
150
Why is RC4 still being used?
tamaiyutaro
0
310
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
12
1.8k
SRE歴2ヶ月でも開発6年の知見を活かして、チームで止まっていた環境改善を前に進めた話
a_ono
1
220
証券システムを10年Scalaで作り続けるということ - 関数型まつり2026
krrrr38
3
750
実装だけじゃない! CCA-F取得エンジニアが教えるClaude Code開発プロセス活用術
diggymo
2
440
“ID沼入口” - 基本とセキュリティから始める、考え続けるためのID管理技術勉強会 告知&イントロ
ritou
0
440
デジタル・デザイン:次の50年を描く「進化する青写真」
y150saya
0
840
プライバシー保護の理論と実践
lycorptech_jp
PRO
1
250
はじめてのWDM
miyukichi_ospf
1
120
テスト設計の本質を改めて考えてみる~生成AIを活用する時代だからこそ、作ったテストの説明性を高めよう~
yamasaki696
1
390
生成AI活用によるODC欠陥分析の分類高速化の実践と導入効果 / 20260703 Suguru Ishii
shift_evolve
PRO
2
100
Featured
See All Featured
Thoughts on Productivity
jonyablonski
76
5.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.9k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Ethics towards AI in product and experience design
skipperchong
2
320
It's Worth the Effort
3n
188
29k
Embracing the Ebb and Flow
colly
88
5.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
From π to Pie charts
rasagy
0
230
Transcript
Web 200: Anatomy of a Request @johndbritton
How does this...
[enter]
...become this...
...on the internet?
Internet, how does it work?
• Driving a car • Shipping containers It’s all about
abstraction
Major players • HTTP • URI • Browser • Web
server • DNS • Operating system • Interface • Network • Router ! ! • ... among others
OSI Model • 7 Layers • We won’t cover everything
• Really boring • Required if you want some bogus certificates • Actually a useful concept
HTTP The language browsers speak
Client server model • Web page is a document •
User inputs http://example.com • The client (browser) makes a GET request • The server sends a response • The browser renders the page
URI • http://github.com/johndbritton • http - protocol • github.com -
domain • /johndbritton - resource
Request GET /johndbritton
Response <!DOCTYPE html> ...
More Requests GET /style.css GET /jquery.js GET /image.jpg GET /image2.jpg
...
More Responses (you get the idea)
Rendering • HTML - Structure • CSS - Style •
Javascript - Behavior
Telnet, Inspector, JSFiddle Let’s try them out
Browser - ONLY HTTP Doesn’t care about anything else
HTTP: methods / verbs • GET • POST • PUT
• DELETE • more: HEAD, PATCH, TRACE, OPTIONS, CONNECT
HTTP: responses • 1xx - informational • 2xx - success
• 3xx - redirect • 4xx - error • 5xx - server error
The webserver It speaks HTTP too
Two types of webapp • Static • Receive a request
• Find a file on disk • Respond with contents of the file • Dynamic • Receive a request • Run application logic • Return a dynamically generated response
DNS: name resolution Where do requests go?
github.com 207.97.227.239
Lookups are cached for improved performance
Possible cache hits • Local machine • Home router •
ISP • Upstream provider
No cache - worst case • 13 Root nameservers •
TLD nameserver • Authoritative nameserver • A record • IP address
dig github.com ; <<>> DiG 9.8.3-P1 <<>> github.com ... github.com.
2 IN A 207.97.227.239
Making a connection • Resolve name • Open a connection
• Speak HTTP
Network collection of nodes that can communicate directly
Interface connection from node to communication medium
IP address 0.0.0.0 - 255.255.255.255
Why 255? • 0 - 255 • binary, 8 bits
• 00000000 - 11111111 • 00000000.00000000.00000000.00000000 • 11111111.11111111.11111111.11111111
Network addresses • a.b.c.d/n (n = network mask / subnet)
• Private (non routable) networks • 10.0.0.0/8 • 172.16.0.0/12 • 192.168.0.0/16
Special addresses • 192.268.1.0/24 - network with subnet • 192.168.1.0
- network address • 192.168.1.255 - broadcast address
Network settings • Auto-configured via DHCP • IP: 192.168.1.101 •
Subnet Mask: 255.255.255.0 (/24) • Router: 192.168.1.1 • DNS Servers: 192.168.1.1
Network hardware • Hub - Dumb • Switch - Smarter
• Router - Smartest
Network protocols • Transport - chunks of data • TCP
• UDP • Routing - • RIP • OSPF
Transport • OS segments data, packages it up into packets
• TCP • Reliable - resend on transmission failure • UDP • Unreliable - send once
Routing • Routers connect networks, handle packets and don’t care
what’s inside • RIP • Distance vector (hop count) • OSPF • Open shortest path first (link weight)
whatismyipaddress.com 166.137.88.161 github.com 207.97.227.239
NAT Network address translation
ifconfig 192.168.1.101 whatismyipaddress.com 166.137.88.161 github.com 207.97.227.239
traceroute, nmap, wireshark if we have time