Lecture 2 Flashcards

Application Layer

1
Q

What does HTTP stand for?

A

HyperText Transfer Protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the application-layer protocol that is at the center of the Internet?

A

The hypertext transfer protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What transport protocol does HTTP use? Can you explain the how it uses it?

A

TCP.

To use it, the client initiates a TCP connection through sockets with the server on port 80. The messages are exchanged between the client and server. The connection is then closed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does it mean that HTTP is a stateless protocol?

A

It doesn’t store any data about the clients or requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Non-persistant HTTP?

A

When only one object is sent over a TCP connection for HTTP(Requests are not included as objects). Once the first response object acknowledged by the client, the server will close the connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is persistant HTTP?

A

When multiple objects are transfered over the connection (Requests made on the clients part are not objects). A server will leave the connection open after sending a response object, and will wait for another request. The server will close the connect if not used for a long time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is round trip time (RTT)?

A

The time it takes a packet of data to travel from the client to the server then back to the client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the response time for Non-persistant HTTP?

A

2RTT + transmission time.

One round trip time (RTT) to initiate the TCP connection with the server. Another RTT to make the request and have receive the response from the server. We also add the file transmission time to this.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name 3 disadvantages of Non-persistant HTTP?

A
  1. Each object requires a minimum of 2RTT. Thus it can take a long time.
  2. Operating system overhead required for each TCP connection.
  3. Browsers can open multiple TCP connections at a time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is included in a HTTP request?

A
The request line.
The header lines.
A blank line.
The entity body.
And an end of message marker.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is included in a HTTP response?

A
The status line.
The header lines.
A blank line.
The entity body.
An end of message marker.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Since HTTP is stateless, how does it succeed when a persistant user state or client information is needed?

A

It uses cookies to store the information. The client keeps a cookie file and the server keeps a back-end database. Both the HTTP request and response pass cookie ID.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the goal of Web caching?

A

To satisfy user requests without involvement of the origin server. A browser/client will instead communicate will a proxy server. Clients are configured to use these proxys.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain how Web caching is carried out on a connection.

A
  1. The browser sets up a TCP connection with a proxy server/Web cache and sends a HTTP request for a Web object.
  2. The Web cache checks if it has the object stored locally. If so, it sets the object back as a HTTP response.
  3. If it doesn’t have the object, it will then connect to the origin server and request the object.
  4. Once the Web cache receives the object from the origin server, it will sent it to the client and store the object for future requests.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Advantages of Web caching?

A

It reduces the response times for the client requests by having requested objects stored locally.
It can reduce the work load on the origin server.
Substantially reduces the amount of traffic on institutional access links.
It is used to filter unsuitable and unsafe content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do objects update on Web caching?

A

When the origin server respond with an object, it includes the header line “Last-modified”. The cache knows this is the latest version. The next time the cache requests that object it includes the header line “If-Modified-Since”. If the object is out of date the origin server sents the latest one with the first header line, if not it sends a 304 message.

17
Q

What are messages sent as on UDP connections.

A

Datagrams.

18
Q

Explain the process of sending data through a UDP connection.

A

The server creates a server socket and listens on port x. The client creates a client socket using the server’s address and port x.
The client will then send a datagram package. The server receives the data, and then sents a reply to the server socket specifying the address and port number of the client.
The client reads in the response, and then closes the socket.