Protocol - NCLab, KAIST

Download Report

Transcript Protocol - NCLab, KAIST

Protocol(TCP/IP, HTTP)
송준화
조경민
2001/03/13
Layering of TCP/IP-based
protocols
HTTP
FTP
transport
layer
TCP
Network
layer
NFS
RPC
TELNET
DNS
SNMP
UDP
IP
data link
layer
2001/03/13
Network Computing Lab.
2
TCP Characteristic

TCP is connection-oriented



TCP provides a stream-of-bytes service.
TCP is reliable







3-way handshake is used for connection setup/teardown
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.
3
TCP is connection-oriented
2001/03/13
Network Computing Lab.
4
Connection
Establishment/Close

telnet address port


telnet> quit  equivalent to “close”


Active open
Makes the system to send “FIN” for “active
close”
Time Wait State (2MSL state)



On “active close” side
MSL: maximum segment lifetime
Two effects:


2001/03/13
lost ACK
Port reuse
Network Computing Lab.
5
TCP segment header
20 bytes
2001/03/13
Network Computing Lab.
6
(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.
7
IP characteristic

Connectionless


Unreliable


mis-sequencing
may drop packets
Best Effort
2001/03/13
Network Computing Lab.
8
IP : Internet Protocol
2001/03/13
Network Computing Lab.
9
The IP Datagram
20 bytes
2001/03/13
Network Computing Lab.
10
(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.
11
HTTP

HTTP

Stateless protocol


2001/03/13
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.
Network Computing Lab.
12
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


2001/03/13
Persistent connection
Pipeline of requests
Network Computing Lab.
13
HTTP 1.0 vs. HTTP 1.1(2)

HTTP 1.1

Persistent connection




Pipeline of requests

2001/03/13
Avoids many round trip delays
Improving performance
Reducing the number of packets exchanged
Allows multiple requests to be sent without
waiting for a response.
Network Computing Lab.
14
HTTP interaction
HTTP 1.0
2001/03/13
HTTP 1.1
Network Computing Lab.
15
Anatomy of an HTTP transaction
2001/03/13
Network Computing Lab.
16
(Network) System Overview
The main issue is how we can improve network
system performance at each component.
Internet
Client
Browser
TCP
TCP
IP
ethernet
card
ws
router
edge
router
core
router
edge
router
router
front
end
ws
DB
ws
2001/03/13
Network Computing Lab.
17
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




2001/03/13
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.
Network Computing Lab.
18
Where are the delays?(2)

Network

2001/03/13
The network imposes delays to deliver
information from the client to server and
back from the server to client.
Network Computing Lab.
19
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.
20
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.
21
QoS(Quality of Service)(2)

Users perceive Web services through
performance metrics such as:


Response time
Availability


Reliability



2001/03/13
The percentage of time a site is available during an
observation period.
Measuring the occurrence of failures during the
processing or services.
Predictability
Cost
Network Computing Lab.
22
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.
23
QoS(Quality of Service)(4)

Unpredictable





2001/03/13
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.
Network Computing Lab.
24