SlideShare a Scribd company logo
HTTP
All you need to know
Who are you?
Gökhan Şengün
R&D Business Dev., New Product & Solutions Manager
www.gokhansengun.com
@gokhansengun
Aim
• Better understand HTTP basics to debug problems better
• Know HTTP players to see the big picture
• Know useful tools to do things faster
HTTP
• HTTP is a stateless protocol.
• How is being stateless like?
• A stateless protocol does not require the server to retain information or
status about each user for the duration of multiple requests.
Http Proxy
Popular Http Proxies
• Fiddler
• Burp Suite
• Browser Developer Tools (Embedded Proxy)
Demo – Bare Metal - Using Telnet
Demo – Browser Developer Tool
Demo – Fiddler
Demo – Burp Suite
Http Protocol – Important Parts
Methods
Method Used for
GET Retrieve a resource
POST Create / Update a resource [Not Idempotent]
PUT Create / Update a resource [Idempotent]
DELETE Delete a resource
HEAD Retrieve a resource except the body
Response Codes
Code Meaning
1xx Informative
2xx Success
3xx Requires Additional Action
4xx Client Error (It is your fault)
5xx Server Error (It is my fault)
Accept (Req)
MIME used for media-type. Client gives hint about the types that
it understands well and preference.
Syntax:
• Accept: <MIME_type>/<MIME_subtype>
Examples:
• Accept: application/json, text/xml;q=0.9, */*;q=0.8
Content-Type (Req / Resp)
MIME used for media-type
Examples:
• Content-Type: text/html; charset=utf-8
• Content-Type: application/json
• Content-Type: text/xml
Demo – Accept and Content-Type
Host (Req)
• Hints the web server about the domain name requested
• Optionally includes port, default
• HTTP: 80
• HTTPS: 443
Examples:
• Host: www.gokhansengun.com
• Host: localhost:8090
Connection (Req / Resp)
• Hint from both client and the web server about TCP connection
• close: if either party for some reason wants to close
• keep-alive: if either party want to keep open for further requests
• Persistent connection (default in HTTP/1.1
• RFC 2616 limits 2 connection per host, browsers have 6 now.
Examples:
• Connection: close
• Connection: keep-alive
BTW: Http Pipelining
• Only Idempotent
requests allowed (GET,
HEAD)
• Guess why?
• Has benefit only on
high latency setups.
Accept-Languge (Req)
• Hint from client about its language preference
Examples:
• Accept-Language: en-US,en;q=0.8
• Accept-Language: tr-TR, tr;q=0.9, en;q=0.8, *;q=0.5
Demo – Accept-Language
Accept-Encoding (Req)
• Hint from client about its encoding preference
Examples:
• Accept-Encoding: Accept-Encoding: gzip, deflate, sdch
• Omit for non-encoding
Demo – Accept-Encoding
Referer (Req)
• Hint from client about the last page user navigated from.
• Allows analytics, caching, logging
Examples:
• Referer: http://ads.xyz.com
User-Agent (Req)
• Hint from client about the type of client
Examples:
• User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/54.0.2840.71 Safari/537.36
Cache-Control (Req / Resp)
• Hint from server to all over the world about resource’s cache
eligibility.
• Cache-Control: no-cache
• Cache-Control: public
• Cache-Control: private
• Cache-Control: no-store
• Cache-Control: max-age=300
• Cache-Control: public, max-age=31536000
Post / Redirect / Get Pattern (1)
• Problem (Multiple Post requests)
Post / Redirect / Get Pattern (2)
Post / Redirect / Get Pattern (3)
• Solution
Demo – Mix
HTTP Players
• Web Servers
• Load Balancers
• DDoS Protection and WAF Systems
• Cache Server
• CDN (Content Delivery Networks)
• Cloudflare
Web Servers
• Nginx
• Apache
• IIS
Load Balancers
• Balance HTTP load between servers
• Balance statefully (needs your SSL private key)
• Cache responses
• Alters requests and responses
• Blocks, rate-limits requests
• Does SSL-offloading (needs your SSL private key and
beneficial only if you have HW LB)
DDoS Protection Systems and WAF
• Observes traffic (needs your SSL private key)
• Detects malicious activity – several attacks
• Blocks IP, IP Range
• Redirects to No CAPTCHA or reCAPTCHA
• Rate-limits requests
Cache Servers
• Caches any type of HTTP responses from origion
• Could be static file or reference data
• Like very very simple KV store
• Powerful if scripting allowed
Examples:
• Varnish
• Nginx
CDN (Content Delivery Network)
• Caches the content on the edges
• Request does not enter your data center
• Very very efficient
Http - All you need to know
Cloudflare
• CDN
• Load Balancing (Cloud – Region Based through DNS)
• DDoS
• WAF
• Rate Limiting
• Website Optimization
• Cache Header Optimization
• AutoMinify
• Aggressive Gzip
• Automatic Content Caching
Cookies
• Helps stateless HTTP protocol statefulness when necessary,
• Has restrictions in EU.
Types:
• Session Cookies
• Persistent Cookies
Authentication and Tokens
• Basic Authentication
• Forms Authentication
• Token Authentication
Session Cookie vs Token Auth
HTTP Security
• Use SSL/TLS for transport layer security (HTTPS everything)
• Why?
• Set Cookies with HttpOnly
• Avoid Cross Site Scripting
• Set Cookies with Secure
• Avoid sending cookies in HTTP requests
• Use HSTS (HTTP Strict Transport Security) header
• Instruct browser to comm only with HTTPS for a period of time
• Avoid SSL-stripping attacks
HTTP Performance Measurement
• Use Apache ab
• Use Apache JMeter (blogs from www.gokhansengun.com)
• http://loader.io/
• https://www.blazemeter.com/
• Use APM (Application Performance Monitoring) tools
• NewRelic, Dynatrace, Riverbed, App
Scaling HTTP
• Use Cache Server
• Use CDN
• Cache Aggressively
• Use DNS load balancing
• Use SPA (Single Page Application) Technique
• Minify and bundle JS / CSS
Questions?

More Related Content

What's hot (20)

PPTX
Http-protocol
Toushik Paul
 
PPTX
HTTP
vaibhavrai1993
 
PPTX
HTTP Protocol Basic
Chuong Mai
 
PPTX
HTTP fundamentals for developers
Mario Cardinal
 
PPTX
HTTP vs HTTPS, Do You Really Need HTTPS?
CheapSSLsecurity
 
PPTX
Introduction to HTTP protocol
Aviran Mordo
 
PPT
Hypertext transfer protocol (http)
johnny19910916
 
PDF
HTTP & HTML & Web
Peter R. Egli
 
PPTX
HTTPS
maroti164
 
PDF
HTTP
Daniel Kummer
 
PPT
HTTP Basics
sanjoysanyal
 
PPTX
Http Vs Https .
simplyharshad
 
PPT
Http VS. Https
Raed Aldahdooh
 
PPTX
Hypertext Transfer Protocol
Shubham Srivastava
 
PPTX
Web (HTTP) request to response life cycle
Gopakumar Kunduveetil
 
PPTX
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
rahul kundu
 
PPTX
Introduction to HTTP
Yihua Huang
 
PPTX
Http request and http response
Nuha Noor
 
PPTX
HyperText Transfer Protocol (HTTP)
Gurjot Singh
 
PDF
Http methods
maamir farooq
 
Http-protocol
Toushik Paul
 
HTTP Protocol Basic
Chuong Mai
 
HTTP fundamentals for developers
Mario Cardinal
 
HTTP vs HTTPS, Do You Really Need HTTPS?
CheapSSLsecurity
 
Introduction to HTTP protocol
Aviran Mordo
 
Hypertext transfer protocol (http)
johnny19910916
 
HTTP & HTML & Web
Peter R. Egli
 
HTTPS
maroti164
 
HTTP Basics
sanjoysanyal
 
Http Vs Https .
simplyharshad
 
Http VS. Https
Raed Aldahdooh
 
Hypertext Transfer Protocol
Shubham Srivastava
 
Web (HTTP) request to response life cycle
Gopakumar Kunduveetil
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
rahul kundu
 
Introduction to HTTP
Yihua Huang
 
Http request and http response
Nuha Noor
 
HyperText Transfer Protocol (HTTP)
Gurjot Singh
 
Http methods
maamir farooq
 

Similar to Http - All you need to know (20)

PPTX
Web technologies: HTTP
Piero Fraternali
 
PDF
Communicating on the web
Adrian Cardenas
 
PPTX
http presentation 1.pptx
DeepakKumar408406
 
PPTX
application of http.pptx
ssuseraf60311
 
PPT
KMUTNB - Internet Programming 2/7
phuphax
 
PDF
HTTP In-depth
Vinayak Hegde
 
PDF
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne
 
PDF
CNIT 129S - Ch 3: Web Application Technologies
Sam Bowne
 
PPTX
HTTP
bhavanatmithun
 
PPT
Juglouvain http revisited
marctritschler
 
PDF
Revisiting HTTP/2
Fastly
 
PPTX
Http2 Security Perspective
Sunil Kumar
 
PPTX
Http and its Applications
Nayan Dagliya
 
PDF
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
Alessandro Nadalin
 
PPTX
01. http basics v27
Eoin Keary
 
PDF
Introduction to HTTP
Seble Nigussie
 
PPT
HTTP
spacecharge
 
PPTX
Http/2
Adrian Cardenas
 
PDF
HTTPs Strict Transport Security
Gol D Roger
 
PPTX
Client sidesec 2013-intro
Tal Be'ery
 
Web technologies: HTTP
Piero Fraternali
 
Communicating on the web
Adrian Cardenas
 
http presentation 1.pptx
DeepakKumar408406
 
application of http.pptx
ssuseraf60311
 
KMUTNB - Internet Programming 2/7
phuphax
 
HTTP In-depth
Vinayak Hegde
 
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne
 
CNIT 129S - Ch 3: Web Application Technologies
Sam Bowne
 
Juglouvain http revisited
marctritschler
 
Revisiting HTTP/2
Fastly
 
Http2 Security Perspective
Sunil Kumar
 
Http and its Applications
Nayan Dagliya
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
Alessandro Nadalin
 
01. http basics v27
Eoin Keary
 
Introduction to HTTP
Seble Nigussie
 
HTTPs Strict Transport Security
Gol D Roger
 
Client sidesec 2013-intro
Tal Be'ery
 
Ad

Recently uploaded (20)

PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Ad

Http - All you need to know

  • 3. Gökhan Şengün R&D Business Dev., New Product & Solutions Manager www.gokhansengun.com @gokhansengun
  • 4. Aim • Better understand HTTP basics to debug problems better • Know HTTP players to see the big picture • Know useful tools to do things faster
  • 5. HTTP • HTTP is a stateless protocol. • How is being stateless like? • A stateless protocol does not require the server to retain information or status about each user for the duration of multiple requests.
  • 7. Popular Http Proxies • Fiddler • Burp Suite • Browser Developer Tools (Embedded Proxy)
  • 8. Demo – Bare Metal - Using Telnet
  • 9. Demo – Browser Developer Tool
  • 11. Demo – Burp Suite
  • 12. Http Protocol – Important Parts
  • 13. Methods Method Used for GET Retrieve a resource POST Create / Update a resource [Not Idempotent] PUT Create / Update a resource [Idempotent] DELETE Delete a resource HEAD Retrieve a resource except the body
  • 14. Response Codes Code Meaning 1xx Informative 2xx Success 3xx Requires Additional Action 4xx Client Error (It is your fault) 5xx Server Error (It is my fault)
  • 15. Accept (Req) MIME used for media-type. Client gives hint about the types that it understands well and preference. Syntax: • Accept: <MIME_type>/<MIME_subtype> Examples: • Accept: application/json, text/xml;q=0.9, */*;q=0.8
  • 16. Content-Type (Req / Resp) MIME used for media-type Examples: • Content-Type: text/html; charset=utf-8 • Content-Type: application/json • Content-Type: text/xml
  • 17. Demo – Accept and Content-Type
  • 18. Host (Req) • Hints the web server about the domain name requested • Optionally includes port, default • HTTP: 80 • HTTPS: 443 Examples: • Host: www.gokhansengun.com • Host: localhost:8090
  • 19. Connection (Req / Resp) • Hint from both client and the web server about TCP connection • close: if either party for some reason wants to close • keep-alive: if either party want to keep open for further requests • Persistent connection (default in HTTP/1.1 • RFC 2616 limits 2 connection per host, browsers have 6 now. Examples: • Connection: close • Connection: keep-alive
  • 20. BTW: Http Pipelining • Only Idempotent requests allowed (GET, HEAD) • Guess why? • Has benefit only on high latency setups.
  • 21. Accept-Languge (Req) • Hint from client about its language preference Examples: • Accept-Language: en-US,en;q=0.8 • Accept-Language: tr-TR, tr;q=0.9, en;q=0.8, *;q=0.5
  • 23. Accept-Encoding (Req) • Hint from client about its encoding preference Examples: • Accept-Encoding: Accept-Encoding: gzip, deflate, sdch • Omit for non-encoding
  • 25. Referer (Req) • Hint from client about the last page user navigated from. • Allows analytics, caching, logging Examples: • Referer: http://ads.xyz.com
  • 26. User-Agent (Req) • Hint from client about the type of client Examples: • User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
  • 27. Cache-Control (Req / Resp) • Hint from server to all over the world about resource’s cache eligibility. • Cache-Control: no-cache • Cache-Control: public • Cache-Control: private • Cache-Control: no-store • Cache-Control: max-age=300 • Cache-Control: public, max-age=31536000
  • 28. Post / Redirect / Get Pattern (1) • Problem (Multiple Post requests)
  • 29. Post / Redirect / Get Pattern (2)
  • 30. Post / Redirect / Get Pattern (3) • Solution
  • 32. HTTP Players • Web Servers • Load Balancers • DDoS Protection and WAF Systems • Cache Server • CDN (Content Delivery Networks) • Cloudflare
  • 33. Web Servers • Nginx • Apache • IIS
  • 34. Load Balancers • Balance HTTP load between servers • Balance statefully (needs your SSL private key) • Cache responses • Alters requests and responses • Blocks, rate-limits requests • Does SSL-offloading (needs your SSL private key and beneficial only if you have HW LB)
  • 35. DDoS Protection Systems and WAF • Observes traffic (needs your SSL private key) • Detects malicious activity – several attacks • Blocks IP, IP Range • Redirects to No CAPTCHA or reCAPTCHA • Rate-limits requests
  • 36. Cache Servers • Caches any type of HTTP responses from origion • Could be static file or reference data • Like very very simple KV store • Powerful if scripting allowed Examples: • Varnish • Nginx
  • 37. CDN (Content Delivery Network) • Caches the content on the edges • Request does not enter your data center • Very very efficient
  • 39. Cloudflare • CDN • Load Balancing (Cloud – Region Based through DNS) • DDoS • WAF • Rate Limiting • Website Optimization • Cache Header Optimization • AutoMinify • Aggressive Gzip • Automatic Content Caching
  • 40. Cookies • Helps stateless HTTP protocol statefulness when necessary, • Has restrictions in EU. Types: • Session Cookies • Persistent Cookies
  • 41. Authentication and Tokens • Basic Authentication • Forms Authentication • Token Authentication
  • 42. Session Cookie vs Token Auth
  • 43. HTTP Security • Use SSL/TLS for transport layer security (HTTPS everything) • Why? • Set Cookies with HttpOnly • Avoid Cross Site Scripting • Set Cookies with Secure • Avoid sending cookies in HTTP requests • Use HSTS (HTTP Strict Transport Security) header • Instruct browser to comm only with HTTPS for a period of time • Avoid SSL-stripping attacks
  • 44. HTTP Performance Measurement • Use Apache ab • Use Apache JMeter (blogs from www.gokhansengun.com) • http://loader.io/ • https://www.blazemeter.com/ • Use APM (Application Performance Monitoring) tools • NewRelic, Dynatrace, Riverbed, App
  • 45. Scaling HTTP • Use Cache Server • Use CDN • Cache Aggressively • Use DNS load balancing • Use SPA (Single Page Application) Technique • Minify and bundle JS / CSS

Editor's Notes

  • #9: Demo using Telnet
  • #11: Show Text wizard Repeat Requests Compose
  • #14: GET carries parameters in the URL whereas POST carries in the request body COPY paste the URL easily
  • #15: GET carries parameters in the URL whereas POST carries in the request body COPY paste the URL easily
  • #18: Using Github API https://api.github.com/users/gokhansengun
  • #23: www.facebook.com using Fiddler’s Composer
  • #25: www.gokhansengun.com using Fiddler’s Composer
  • #32: Visit www.milliyet.com.tr Revisit Visit www.gokhansengun.com Revisit Visit localhost/app, login Post Redirect Get Tell what 301, 302, 304 are.
  • #45: Apache Ab ab -k -c 1000 -n 10000 http://172.16.41.197/ist