SlideShare a Scribd company logo
1 of 33
Download to read offline
Presentation on
Web Technology
Topic: HTTP server and HTTP protocol
Course Code: CSE-502
May 14, 2015 IIT, University of Dhaka 1
Presented by:
Md. Rakib Hossain, BSSE-0516
A. H. M. Azimul Haque, BSSE-0519
Md. Mahbub Islam, BSSE-0510
Md. Rashedul Islam, BSSE-0510
Submitted to:
Mr. Amit Seal Ami
Lecuturer,
Institute of Information Technology
University of Dhaka
May 14, 2015 IIT, University of Dhaka 2
 Is a system of interlinked hypertext documents
 Accessed via the Internet with a web browser
 Client/Server data transfer protocol
 Communication via application level protocol
 Run on standard networking infrastructure
May 14, 2015 IIT, University of Dhaka 3
Internet World Wide Web
 The Internet is a global
system of
interconnected
computer networks.
 Its access is provided by
ISPs.
 It runs applications like
www, ftp, html etc
 Web is collection of text
documents and other
resources, linked by
hyperlinks and URLs
 Usually accessed
by web browsers
 Its an application
running on Internet
May 14, 2015 IIT, University of Dhaka 4
 Web page consists of objects
 Object can be HTML file, JPEG image, Java
applet, audio file,…
 Web page consists of base HTML-file which
includes several referenced objects
 Each object is addressable by a URL
 Example URL:
www.someschool.edu/someDept/pic.gif
host name path name
May 14, 2015 IIT, University of Dhaka 5
<scheme> : //<host> :<port> /<path>
;<parameters> ?<query> #<fragment>
Here
scheme
The protocol you are using
host
Host name or ip number
port
TCP port number that protocol server is using
path
Path and filename reference of object on server
parameters
Any specific parameters that object needs
query
Query string for a CGI program
fragment
Reference to a subset of an object
May 14, 2015 IIT, University of Dhaka 6
HTTP: hypertext transfer
protocol
 Web’s application layer
protocol
 client/server model
 client: browser that
requests, receives,
“displays” Web objects
 server: Web server sends
objects in response to
requests
 HTTP 1.0: RFC 1945
 HTTP 1.1: RFC 2068
PC running
Explorer
Server
running
Apache Web
server
Mac running
Navigator
May 14, 2015 IIT, University of Dhaka 7
Uses TCP:
 client initiates TCP connection
(creates socket) to server, port 80
 server accepts TCP connection from
client
 HTTP messages (application-layer
protocol messages) exchanged
between browser (HTTP client) and
Web server (HTTP server)
 HTTP – not worry about lost data;
taken care of by TCP
 TCP connection closed
HTTP is “stateless”
 server maintains no
information about past
client requests
Protocols that maintain
“state” are complex!
 past history (state) must be
maintained
 if server/client crashes, their
views of “state” may be
inconsistent, must be
reconciled
May 14, 2015 IIT, University of Dhaka 8
HTTP connections
Non-persistent HTTP
 At most one object is sent over a TCP connection.
 HTTP/1.0 uses nonpersistent HTTP
May 14, 2015 IIT, University of Dhaka 9
HTTP connections
Persistent HTTP
 Multiple objects can be sent over single TCP connection
between client and server.
 HTTP/1.1 uses persistent connections in default mode
May 14, 2015 IIT, University of Dhaka 10
Non-persistent HTTP
Suppose user enters URL
www.someSchool.edu/someDepartment/home.index
1a. HTTP client initiates TCP
connection to HTTP server (process)
at www.someSchool.edu on port 80
2. HTTP client sends HTTP request
message (containing URL) into
TCP connection socket. Message
indicates that client wants object
someDepartment/home.index
1b. HTTP server at host
www.someSchool.edu waiting for
TCP connection at port 80.
“accepts” connection, notifying
client
3. HTTP server receives request
message, forms response message
containing requested object, and
sends message into its socket
time
(contains text,
references to 10
jpeg images)
May 14, 2015 IIT, University of Dhaka 11
Non-persistent HTTP
5. HTTP client receives response
message containing html file,
displays html. Parsing html file,
finds 10 referenced jpeg objects
6. Steps 1-5 repeated for each of 10
jpeg objects
4. HTTP server closes TCP connection.
TCP waits and terminates the
connection when it knows that the
message is received by the client
time
Serial vs. parallel TCP connections
May 14, 2015 IIT, University of Dhaka 12
HTTP: Response time
RTT: time to send a small packet to travel
from client to server and back.
May 14, 2015 IIT, University of Dhaka 13
14
Non-Persistent HTTP:
Response time
Response time:
 one RTT to initiate TCP
connection
 one RTT for HTTP request
and first few bytes of HTTP
response to return
 file transmission time
total = 2RTT+transmit time
May 14, 2015 IIT, University of Dhaka 14
Non-Persistent HTTP
Non-persistent HTTP issues:
 requires 2 RTTs per object
 OS overhead for each TCP connection
 browsers often open parallel TCP connections to fetch
referenced objects
 Serious burden on Web server
May 14, 2015 IIT, University of Dhaka 15
Persistent HTTP
Persistent HTTP
 server leaves connection
open after sending
response
 subsequent HTTP
messages between same
client/server sent over open
connection
 Closes connection after
TIMEOUT INTERVAL!!!
May 14, 2015 IIT, University of Dhaka 16
Persistent Connection and
Pipelining
Persistent without pipelining:
 client issues new request only when previous response has
been received
 one RTT for each referenced object
Persistent with pipelining:
 default in HTTP/1.1
 client sends requests as soon as it encounters a referenced
object
 as little as one RTT for all the referenced objects
May 14, 2015 IIT, University of Dhaka 17
Persistent Connection and
Pipelining
May 14, 2015 IIT, University of Dhaka 18
HTTP request message
 two types of HTTP messages: request, response
 HTTP request message:
 ASCII (human-readable format)
GET /somedir/page.html HTTP/1.1
Host: www.someschool.edu
User-agent: Mozilla/4.0
Connection: close
Accept-language:fr
(extra carriage return, line feed)
request line
(GET, POST,
HEAD commands)
header
linesCarriage return,
line feed
indicates end
of message
May 14, 2015 IIT, University of Dhaka 19
HTTP request message
Con…
May 14, 2015 IIT, University of Dhaka 20
HTTP request message:
general format
May 14, 2015 IIT, University of Dhaka 21
Uploading form input
Post method:
 Web page often includes
form input
 Input is uploaded to server
in entity body
URL method:
 Uses GET method
 Input is uploaded in URL
field of request line:
www.somesite.com/animalsearch?monkeys&banana
May 14, 2015 IIT, University of Dhaka 22
Method types
HTTP/1.0
 GET
 POST
 HEAD
 asks server to leave
requested object out of
response
HTTP/1.1
 GET, POST, HEAD
 PUT
 uploads file in entity body
to path specified in URL
field
 DELETE
 deletes file specified in the
URL field
May 14, 2015 IIT, University of Dhaka 23
HTTP response message
HTTP/1.1 200 OK
Connection close
Date: Thu, 06 Aug 1998 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
Last-Modified: Mon, 22 Jun 1998 …...
Content-Length: 6821
Content-Type: text/html
data data data data data ...
status line
(protocol
status code
status phrase)
header
lines
data, e.g.,
requested
HTML file
May 14, 2015 IIT, University of Dhaka 24
HTTP response message
con..
May 14, 2015 IIT, University of Dhaka 25
HTTP response status codes
200 OK
 request succeeded, requested object later in this message
301 Moved Permanently
 requested object moved, new location specified later in this message
(Location:)
400 Bad Request
 request message not understood by server
404 Not Found
 requested document not found on this server
505 HTTP Version Not Supported
In first line in server->client response message.
A few sample codes:
May 14, 2015 IIT, University of Dhaka 26
Trying out HTTP (client
side) for yourself
1. Telnet to your favorite Web server:
Opens TCP connection to port 80
(default HTTP server port) at cis.poly.edu.
Anything typed in sent
to port 80 at cis.poly.edu
telnet cis.poly.edu 80
2. Type in a GET HTTP request:
GET /~ross/ HTTP/1.1
Host: cis.poly.edu
By typing this in (hit carriage
return twice), you send
this minimal (but complete)
GET request to HTTP server
3. Look at response message sent by HTTP server!
May 14, 2015 IIT, University of Dhaka 27
User-server state: cookies
Many major Web sites use cookies
Four components:
1) cookie header line of HTTP response message
2) cookie header line in HTTP request message
3) cookie file kept on user’s host, managed by user’s browser
4) back-end database at Web site
May 14, 2015 IIT, University of Dhaka 28
User-server state: cookies
Example:
 Susan access Internet always from same PC
 She visits a specific e-commerce site for first time
 When initial HTTP requests arrives at site, site creates a
unique ID and creates an entry in backend database for ID
May 14, 2015 IIT, University of Dhaka 29
Cookies: keeping “state”
May 14, 2015 IIT, University of Dhaka 30
Web Cookies
What cookies can bring:
 authorization
 shopping carts
 recommendations
 user session state (Web e-
mail)
Cookies and privacy:
 cookies permit sites to learn a lot
about you
 you may supply name and e-mail to
sites
aside
How to keep “state”:
 Protocol endpoints:
maintain state at
sender/receiver over
multiple transactions
 cookies: http messages
carry stateMay 14, 2015 IIT, University of Dhaka 31
Web caches (proxy server)
 user sets browser: Web
accesses via cache
 browser sends all HTTP
requests to cache
 object in cache: cache
returns object
 else cache requests object
from origin server, then
returns object to client
Goal: satisfy client request without involving origin
server
client
Proxy
server
client
origin
server
origin
server
May 14, 2015 IIT, University of Dhaka 32
More about Web caching
 Cache acts as both
client and server
 Typically cache is
installed by ISP
(university, company,
residential ISP)
Why Web caching?
 Reduce response time for
client request.
 Reduce traffic on an
institution’s access link.
 Internet dense with
caches: enables “poor”
content providers to
effectively deliver content
(but so does P2P file
sharing)
May 14, 2015 IIT, University of Dhaka 33

More Related Content

What's hot (20)

Application layer
Application layer Application layer
Application layer
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
HTTP
HTTPHTTP
HTTP
 
Http
HttpHttp
Http
 
Http Protocol
Http ProtocolHttp Protocol
Http Protocol
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 
Servlets
ServletsServlets
Servlets
 
Http request and http response
Http request and http responseHttp request and http response
Http request and http response
 
Http methods
Http methodsHttp methods
Http methods
 
Ftp
FtpFtp
Ftp
 
Basics of HTTP - Nafis Fuad
Basics of HTTP - Nafis FuadBasics of HTTP - Nafis Fuad
Basics of HTTP - Nafis Fuad
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Servlets
ServletsServlets
Servlets
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
File transfer protocol (ftp)
File transfer protocol (ftp)File transfer protocol (ftp)
File transfer protocol (ftp)
 
Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket Programming
 
Socket Programming In Python
Socket Programming In PythonSocket Programming In Python
Socket Programming In Python
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Java servlets
Java servletsJava servlets
Java servlets
 
File Transfer Protocol - FTP
File Transfer Protocol - FTPFile Transfer Protocol - FTP
File Transfer Protocol - FTP
 

Viewers also liked

Viewers also liked (8)

Lets talk dns
Lets talk dnsLets talk dns
Lets talk dns
 
Chapter 2 v6.3
Chapter 2 v6.3Chapter 2 v6.3
Chapter 2 v6.3
 
Week3 applications
Week3 applicationsWeek3 applications
Week3 applications
 
HTTP
HTTPHTTP
HTTP
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 Application
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
 
6 app-tcp
6 app-tcp6 app-tcp
6 app-tcp
 
HTTP
HTTPHTTP
HTTP
 

Similar to Http

Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfRaghunathan52
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfRaghunathan52
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptVietAnhNguyen337355
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systemsReza Gh
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Syed Ariful Islam Emon
 
Abhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techAbhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techabhishek srivastav
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for DevelopersSvetlin Nakov
 
ip1clientserver model
 ip1clientserver model ip1clientserver model
ip1clientserver modelmonikadeshmane
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptxssuseraf60311
 
Introduction to the World Wide Web
Introduction to the World Wide WebIntroduction to the World Wide Web
Introduction to the World Wide WebAbdalla Mahmoud
 
1 web technologies
1 web technologies1 web technologies
1 web technologiesJalpesh Vasa
 

Similar to Http (20)

Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdf
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdf
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
 
www and http services
www and http serviceswww and http services
www and http services
 
Appl layer
Appl layerAppl layer
Appl layer
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3
 
Abhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techAbhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_tech
 
Web technology
Web technologyWeb technology
Web technology
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
 
http presentation 1.pptx
http presentation 1.pptxhttp presentation 1.pptx
http presentation 1.pptx
 
ip1clientserver model
 ip1clientserver model ip1clientserver model
ip1clientserver model
 
Www and http
Www and httpWww and http
Www and http
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptx
 
Introduction to the World Wide Web
Introduction to the World Wide WebIntroduction to the World Wide Web
Introduction to the World Wide Web
 
The HTTP and Web
The HTTP and Web The HTTP and Web
The HTTP and Web
 
1 web technologies
1 web technologies1 web technologies
1 web technologies
 

Recently uploaded

Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Recently uploaded (20)

Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

Http

  • 1. Presentation on Web Technology Topic: HTTP server and HTTP protocol Course Code: CSE-502 May 14, 2015 IIT, University of Dhaka 1
  • 2. Presented by: Md. Rakib Hossain, BSSE-0516 A. H. M. Azimul Haque, BSSE-0519 Md. Mahbub Islam, BSSE-0510 Md. Rashedul Islam, BSSE-0510 Submitted to: Mr. Amit Seal Ami Lecuturer, Institute of Information Technology University of Dhaka May 14, 2015 IIT, University of Dhaka 2
  • 3.  Is a system of interlinked hypertext documents  Accessed via the Internet with a web browser  Client/Server data transfer protocol  Communication via application level protocol  Run on standard networking infrastructure May 14, 2015 IIT, University of Dhaka 3
  • 4. Internet World Wide Web  The Internet is a global system of interconnected computer networks.  Its access is provided by ISPs.  It runs applications like www, ftp, html etc  Web is collection of text documents and other resources, linked by hyperlinks and URLs  Usually accessed by web browsers  Its an application running on Internet May 14, 2015 IIT, University of Dhaka 4
  • 5.  Web page consists of objects  Object can be HTML file, JPEG image, Java applet, audio file,…  Web page consists of base HTML-file which includes several referenced objects  Each object is addressable by a URL  Example URL: www.someschool.edu/someDept/pic.gif host name path name May 14, 2015 IIT, University of Dhaka 5
  • 6. <scheme> : //<host> :<port> /<path> ;<parameters> ?<query> #<fragment> Here scheme The protocol you are using host Host name or ip number port TCP port number that protocol server is using path Path and filename reference of object on server parameters Any specific parameters that object needs query Query string for a CGI program fragment Reference to a subset of an object May 14, 2015 IIT, University of Dhaka 6
  • 7. HTTP: hypertext transfer protocol  Web’s application layer protocol  client/server model  client: browser that requests, receives, “displays” Web objects  server: Web server sends objects in response to requests  HTTP 1.0: RFC 1945  HTTP 1.1: RFC 2068 PC running Explorer Server running Apache Web server Mac running Navigator May 14, 2015 IIT, University of Dhaka 7
  • 8. Uses TCP:  client initiates TCP connection (creates socket) to server, port 80  server accepts TCP connection from client  HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server)  HTTP – not worry about lost data; taken care of by TCP  TCP connection closed HTTP is “stateless”  server maintains no information about past client requests Protocols that maintain “state” are complex!  past history (state) must be maintained  if server/client crashes, their views of “state” may be inconsistent, must be reconciled May 14, 2015 IIT, University of Dhaka 8
  • 9. HTTP connections Non-persistent HTTP  At most one object is sent over a TCP connection.  HTTP/1.0 uses nonpersistent HTTP May 14, 2015 IIT, University of Dhaka 9
  • 10. HTTP connections Persistent HTTP  Multiple objects can be sent over single TCP connection between client and server.  HTTP/1.1 uses persistent connections in default mode May 14, 2015 IIT, University of Dhaka 10
  • 11. Non-persistent HTTP Suppose user enters URL www.someSchool.edu/someDepartment/home.index 1a. HTTP client initiates TCP connection to HTTP server (process) at www.someSchool.edu on port 80 2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index 1b. HTTP server at host www.someSchool.edu waiting for TCP connection at port 80. “accepts” connection, notifying client 3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket time (contains text, references to 10 jpeg images) May 14, 2015 IIT, University of Dhaka 11
  • 12. Non-persistent HTTP 5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. HTTP server closes TCP connection. TCP waits and terminates the connection when it knows that the message is received by the client time Serial vs. parallel TCP connections May 14, 2015 IIT, University of Dhaka 12
  • 13. HTTP: Response time RTT: time to send a small packet to travel from client to server and back. May 14, 2015 IIT, University of Dhaka 13
  • 14. 14 Non-Persistent HTTP: Response time Response time:  one RTT to initiate TCP connection  one RTT for HTTP request and first few bytes of HTTP response to return  file transmission time total = 2RTT+transmit time May 14, 2015 IIT, University of Dhaka 14
  • 15. Non-Persistent HTTP Non-persistent HTTP issues:  requires 2 RTTs per object  OS overhead for each TCP connection  browsers often open parallel TCP connections to fetch referenced objects  Serious burden on Web server May 14, 2015 IIT, University of Dhaka 15
  • 16. Persistent HTTP Persistent HTTP  server leaves connection open after sending response  subsequent HTTP messages between same client/server sent over open connection  Closes connection after TIMEOUT INTERVAL!!! May 14, 2015 IIT, University of Dhaka 16
  • 17. Persistent Connection and Pipelining Persistent without pipelining:  client issues new request only when previous response has been received  one RTT for each referenced object Persistent with pipelining:  default in HTTP/1.1  client sends requests as soon as it encounters a referenced object  as little as one RTT for all the referenced objects May 14, 2015 IIT, University of Dhaka 17
  • 18. Persistent Connection and Pipelining May 14, 2015 IIT, University of Dhaka 18
  • 19. HTTP request message  two types of HTTP messages: request, response  HTTP request message:  ASCII (human-readable format) GET /somedir/page.html HTTP/1.1 Host: www.someschool.edu User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header linesCarriage return, line feed indicates end of message May 14, 2015 IIT, University of Dhaka 19
  • 20. HTTP request message Con… May 14, 2015 IIT, University of Dhaka 20
  • 21. HTTP request message: general format May 14, 2015 IIT, University of Dhaka 21
  • 22. Uploading form input Post method:  Web page often includes form input  Input is uploaded to server in entity body URL method:  Uses GET method  Input is uploaded in URL field of request line: www.somesite.com/animalsearch?monkeys&banana May 14, 2015 IIT, University of Dhaka 22
  • 23. Method types HTTP/1.0  GET  POST  HEAD  asks server to leave requested object out of response HTTP/1.1  GET, POST, HEAD  PUT  uploads file in entity body to path specified in URL field  DELETE  deletes file specified in the URL field May 14, 2015 IIT, University of Dhaka 23
  • 24. HTTP response message HTTP/1.1 200 OK Connection close Date: Thu, 06 Aug 1998 12:00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data ... status line (protocol status code status phrase) header lines data, e.g., requested HTML file May 14, 2015 IIT, University of Dhaka 24
  • 25. HTTP response message con.. May 14, 2015 IIT, University of Dhaka 25
  • 26. HTTP response status codes 200 OK  request succeeded, requested object later in this message 301 Moved Permanently  requested object moved, new location specified later in this message (Location:) 400 Bad Request  request message not understood by server 404 Not Found  requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes: May 14, 2015 IIT, University of Dhaka 26
  • 27. Trying out HTTP (client side) for yourself 1. Telnet to your favorite Web server: Opens TCP connection to port 80 (default HTTP server port) at cis.poly.edu. Anything typed in sent to port 80 at cis.poly.edu telnet cis.poly.edu 80 2. Type in a GET HTTP request: GET /~ross/ HTTP/1.1 Host: cis.poly.edu By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to HTTP server 3. Look at response message sent by HTTP server! May 14, 2015 IIT, University of Dhaka 27
  • 28. User-server state: cookies Many major Web sites use cookies Four components: 1) cookie header line of HTTP response message 2) cookie header line in HTTP request message 3) cookie file kept on user’s host, managed by user’s browser 4) back-end database at Web site May 14, 2015 IIT, University of Dhaka 28
  • 29. User-server state: cookies Example:  Susan access Internet always from same PC  She visits a specific e-commerce site for first time  When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for ID May 14, 2015 IIT, University of Dhaka 29
  • 30. Cookies: keeping “state” May 14, 2015 IIT, University of Dhaka 30
  • 31. Web Cookies What cookies can bring:  authorization  shopping carts  recommendations  user session state (Web e- mail) Cookies and privacy:  cookies permit sites to learn a lot about you  you may supply name and e-mail to sites aside How to keep “state”:  Protocol endpoints: maintain state at sender/receiver over multiple transactions  cookies: http messages carry stateMay 14, 2015 IIT, University of Dhaka 31
  • 32. Web caches (proxy server)  user sets browser: Web accesses via cache  browser sends all HTTP requests to cache  object in cache: cache returns object  else cache requests object from origin server, then returns object to client Goal: satisfy client request without involving origin server client Proxy server client origin server origin server May 14, 2015 IIT, University of Dhaka 32
  • 33. More about Web caching  Cache acts as both client and server  Typically cache is installed by ISP (university, company, residential ISP) Why Web caching?  Reduce response time for client request.  Reduce traffic on an institution’s access link.  Internet dense with caches: enables “poor” content providers to effectively deliver content (but so does P2P file sharing) May 14, 2015 IIT, University of Dhaka 33