Protocol(TCP/IP, HTTP) - NCLab, KAIST

candleberryinfamousΔίκτυα και Επικοινωνίες

26 Οκτ 2013 (πριν από 3 χρόνια και 10 μήνες)

79 εμφανίσεις

Protocol(TCP/IP, HTTP)

송준화

조경민


2001/03/13

2001/03/13

Network Computing Lab.

2

Layering of TCP/IP
-
based
protocols

2001/03/13

Network Computing Lab.

3

TCP Characteristic


TCP is connection
-
oriented


3
-
way handshake is used for connection setup/teardown


TCP provides a stream
-
of
-
bytes service.


TCP is reliable


Acknowledgements indicate delivery of data.


Checksums are used to detect corrupted data.


Sequence numbers detect missing, or mis
-
sequenced data.


Corrupted data is retransmitted after a timeout.


Mis
-
sequenced data is re
-
sequenced.


(Window
-
based) Flow control prevents over
-
run of receiver.


TCP uses congestion control to share network
capacity among users.

2001/03/13

Network Computing Lab.

4

TCP is connection
-
oriented

2001/03/13

Network Computing Lab.

5

Connection
Establishment/Close


telnet address port


Active open


telnet> quit


equivalent to

close



Makes the system to send

FIN


for

active
close



Time Wait State (2MSL state)


On

active close


side


MSL: maximum segment lifetime


Two effects:


lost ACK


Port reuse


2001/03/13

Network Computing Lab.

6

TCP segment header

20
bytes

2001/03/13

Network Computing Lab.

7

(some) TCP Header Fields



URG: urgent bit


One end tells the other that

urgent data


of some form
has been placed into the normal stream of data


Works with 16 bit

urgent pointer


field


ACK:


PSH:


RST:


SYN:


FIN:

2001/03/13

Network Computing Lab.

8

IP characteristic


Connectionless


mis
-
sequencing


Unreliable


may drop packets


Best Effort

2001/03/13

Network Computing Lab.

9

IP : Internet Protocol

2001/03/13

Network Computing Lab.

10

The IP Datagram

20 bytes

2001/03/13

Network Computing Lab.

11

(some) IP Header Fields


TOS:


3 bit precedence (ignored)


4 bit TOS :


(minimize delay, maximize throughput, maximize reliability, minimize monetary cost)


Only one bit can be

on




Usually call bits

off



ID: unique id for each datagram from
a sender


TTL: upper bound for # of hops

2001/03/13

Network Computing Lab.

12

HTTP


HTTP


Stateless protocol


Not include the concept of a session or
interaction beyond delivery of the requested
document.


Do not need to keep track of who the clients
are or what requests were serviced in the
past.



2001/03/13

Network Computing Lab.

13

HTTP 1.0 vs. HTTP 1.1(1)


HTTP 1.0


For each additional request, a new TCP
connection must be established.


The system incurs again in a connection
setup overhead.


HTTP 1.1


Persistent connection


Pipeline of requests

2001/03/13

Network Computing Lab.

14

HTTP 1.0 vs. HTTP 1.1(2)


HTTP 1.1


Persistent connection


Avoids many round trip delays


Improving performance


Reducing the number of packets exchanged


Pipeline of requests


Allows multiple requests to be sent without
waiting for a response.

2001/03/13

Network Computing Lab.

15

HTTP interaction

HTTP 1.0

HTTP 1.1

2001/03/13

Network Computing Lab.

16

Anatomy of an HTTP transaction

2001/03/13

Network Computing Lab.

17

(Network) System Overview

The main issue is how we can improve network

system performance at each component.

2001/03/13

Network Computing Lab.

18

Where are the delays?(1)


Browser


The end user clicks on a hyperlink and requests
a document.


In the case of a hit, returns the requested
document in the local cache.


In the case of a miss


mapping the server hostname to an IP address.


The clients opens a TCP connection to the server.


The clients sends an HTTP request to the server
.


The browser formats and displays the
document and renders the associated images.

2001/03/13

Network Computing Lab.

19

Where are the delays?(2)


Network


The network imposes delays to deliver
information from the client to server and
back from the server to client.

2001/03/13

Network Computing Lab.

20

Where are the delays?(3)


Server


A request
arrives

from the client.


The server
parses

the request, according to the
HTTP protocol.


The server
executes the method

requested.


The server reads the
contents

of the file from
disk or from its main memory cache and writes
it to the network port.


Close the connection


Service time and waiting time at the various
components of the server, such as processor,
disk, and network

2001/03/13

Network Computing Lab.

21

QoS(Quality of Service)(1)


Customers want to have
good services

available at any time.


Customers do not care about site failures,
traffic jams, network bandwidth, or other
indicators of system activities.


Besides
contents

and
aesthetics
, online
users want
performance

and
security
.

2001/03/13

Network Computing Lab.

22

QoS(Quality of Service)(2)


Users perceive Web services through
performance metrics such as:


Response time


Availability


The percentage of time a site is available during an
observation period.


Reliability


Measuring the occurrence of failures during the
processing or services.


Predictability


Cost

2001/03/13

Network Computing Lab.

23

QoS(Quality of Service)(3)


Compounding the need for high
reliability and availability is the
dynamic nature of the Web
, which
internal and external customers rely
on for
up
-
to
-
date

business,
professional, and personal
information.


2001/03/13

Network Computing Lab.

24

QoS(Quality of Service)(4)


Unpredictable


For example, in a large trade show company,


250,000 hits a week during normal weeks


A million hits a day at the peak of its largest
Fall show.


Companies must measure traffic, performance,
and usage patterns in order to
monitor

the
quality of service of their Web sites.


Management has to decide if additional
capacity is needed to stay ahead of customer
demands.