Professional Documents
Culture Documents
Quadrant 1 – e-text
We have had an overview of why and how the networking function is organized in terms of
layers and protocols across the end systems and the different networking devices. We
have also briefly looked at the performance requirements and parameters associated with
reporting performance. Now, it is time to start examining the different protocols at each of
the layers in a fair amount of detail. Since, we use a number of network applications, you
are likely to be familiar with their working. Hence, we will start with understanding of the
protocols involved in such applications. We start with application layer protocols, and then
go down the network protocol stack, taking a top-down approach. The objectives of this
module are as follows.
Learning Objectives
To study the details of Hyper Text Transfer Protocol (HTTP) used for web-browsing
Given these requirements, the applications can choose between TCP and the UDP
protocols available at the transport layer. The TCP protocol provides reliable service, while
the UDP protocol does not provide any sort of guarantees. But the UDP protocol is faster.
Hence for applications that are delay-sensitive, but loss-tolerant, UDP is a good choice.
Applications which require guaranteed delivery, i.e., loss-sensitive, but delay-tolerant
would go for TCP.
Shown in Table 3.2 is the choice of the transport protocol used by common applications.
Table 3.2 Applications and Transport protocols
Over and above these requirements, security may be another aspect that the applications
need. They may not want the data they send to be sent as plain-text throughout the
network, they may require encryption services from the network. Both UDP and TCP do
not provide this service, but there is an SSL (Secure Socket Layer) protocol which
provides encrypted TCP connections. SSL is actually an application layer protocol, which
can be used by other applications to get secure data transfer. We will look at this in later
modules.
Syntax of message types: what are the fields in the messages & how these fields
are delineated,
Semantics of the fields, i.e., meaning of the information in the fields, and
Rules for when and how processes send & respond to messages
We will examine some application layer protocols, and it will become clear as to how this is
achieved.
Table 3.2 gives the application layer protocols used by some of the common applications.
Note that, in Table 3.2, we have mentioned a term called RFC. RFCs (Request For
Comments) are open standards for protocols available at (https://www.ietf.org/rfc.html), as
defined by the IETF (Internet Engineering Task Force). There are over 7000 RFCs
describing various network related protocols!
The protocols in general may be public-domain protocols as defined in the RFCs or
proprietary. The advantage of public-domain or open protocols is that they allow for
interoperability, and further enhancements.
We will now look at the details of one of the most common protocols – the Hyper Text
Transfer Protocol (HTTP) used for information retrieval on the web.
Client Server
Client Server
Client Server
On comparing the three, it can easily be seen that the persistent connection with pipelining
is the most efficient option, and current browsers implement this option. To speed up
performance even in the case of non-persistent connection, sometimes parallel
connections are used. That is, once the base file or main page is retrieved, the three
objects in it could be requested in three parallel connections, thus reducing the overall
time.
3.4.2.1 Response time modeling
It would be more insightful to quantify the response time in each of these cases. Since it is
difficult to estimate the actual time taken given the vagaries of the network, we use Round-
Trip Time (RTT) as a unit of measure to relatively grade the different options. We define
RTT as the time taken for a small packet to travel from client to server and back. The
response time (Fig. 3.5) can then be calculated as follows.
Response time for non-persistent HTTP :
Response time has the following components :
(i) One RTT to initiate TCP connection.
(ii) One RTT for HTTP request and first few
bytes of HTTP response to return
(iii) File transmission time
Time for base file = 2RTT+transmit time
(iv) Repeat components (i) to (iii) for each
referenced object.
Total time = 4 x (2RTT+transmit time).
Figure 3.5 HTTP response time
HTTP Response : The general format of a HTTP response message is given in Fig.3.10.
Host: cis.poly.edu
And press enter twice to complete the header and the request message. This is a minimal
but complete request message.
3. Look at response message sent by HTTP server and displayed on your terminal!
3.4.4 Other features of HTTP
In addition to the basic operation of HTTP that we have discussed, HTTP has several
headers that help improve the versatility and performance of the web-browsing
experience. Since HTTP is stateless, a concept called cookies is used to provide some
notion of state. Many major Web sites use cookies to track their users, their choices,
behavior etc. Cookie is actually a small file that is used to identify the user, and is
maintained by the browser. This identity is used by a back-end database at the server to
track the user. HTTP provides two header lines to exchange this cookie information.
1) Set-Cookie header line of HTTP response message
2) Cookie header line in HTTP request message
If a user accesses Internet always from the same machine, cookies can be used. When a
user visits a specific e-commerce site for the first time, and when the initial HTTP request
arrives at site, the site creates a unique ID and creates an entry in backend database for
that ID. It then sends this ID in the form of a cookie using the set-cookie header line in the
response message. This information is stored by the browser on the users machine.
Subsequently, whenever a request is sent from the same machine to the said server, the
browser checks if a cookie has been set, and if it has been set it sends that information in
the request using the cookie header line. This id is then used to check the back-end
database and user-specific service is provided.
Thus cookies help to provide a notion of state, even though HTTP is stateless.
Similarly, HTTP provides support for caching of content, so that we do not have to
redundantly fetch static content. We will look at these in more detail in the next module.
3.5 Summary
To summarize, the following are the topics we have discussed in this module.
• Application Types & requirements
• Choosing the Transport protocol
• WWW & HTTP
• Persistent & Non-persistent connections
• Request & response messages
As an exercise, we would urge you to read the RFCs of the HTTP protocol, both for
curiosity, and deeper knowledge.