Unit 7: Application Layer Flashcards

1
Q

What is inter-process communication?

A

Two processes communicating within the same host, defined by the OS

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

How do processes in different hosts communicate?

A

By exchanging messages to/from the application layer via sockets

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

What 4 services does TCP provide?

A
  1. Reliable transport
  2. Flow control
  3. Congestion control
  4. Connection-oriented
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is UDP sometimes preferred over TCP?

A

Some apps such as telephony and streaming apps can tolerate lossy data in UDP. There is also less overhead with UDP

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

How is HTTP stateless?

A

The Web/HTTP server maintains no information about past client requests

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

Give the formula for calculating non-persistent HTTP response time for:

a) html file with no referenced objects
b) html file with 10 referenced objects

A

One RTT initiates TCP connection
One RTT for HTTP request
Time to transmit file (usually negligible)
a) Response time = 2RTT + file transmission time
b) Response time = 2RTT + (2RTT*10) + file transmission time

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

What are 2 issues with non-persistent HTTP?

A
  1. Requires 2RTTs per object

2. OS overhead for each TCP connection

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

What happens in persistent HTTP that makes it different to non-persistent?

A

The server leaves the TCP connection open after sending a response therefore subsequent messages between same client/server are sent over open connection

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

What is an issue with persistent HTTP?

A

Open links waste resources, these should be closed after a period of time

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

What are the 4 components of cookies?

A
  1. The cookie header line of HTTP response message
  2. The cookie header line in next HTTP request message
  3. The cookie file kept on user’s host, managed by user’s browser
  4. The entry on the back-end database of website
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the steps of setting a cookie and retrieving this at a later date

A
  1. Client makes HTTP request
  2. Server creates cookie ID for user and creates entry on backend database
  3. Server responds with ID in HTTP response ‘set-cookie’
    Some time passes…
  4. Client makes HTTP request with cookie ID
  5. Server accesses the cookie, does something with it and responds with usual HTTP response
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the purpose of a web cache/proxy server?

A

To satisfy a client request without involving the origin server. Caching locally reduces network delay and traffic

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

Describe the steps of a user sending a HTTP request via proxy server

A
  1. User sends HTTP request to proxy server
  2. Proxy server checks for copy of object stored locally and responds immediately if it is
  3. If not stored locally, TCP connection is opened to origin server and a request is made
  4. Response is acquired from origin server and response is sent back to client
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Give 3 reasons why web caching is used

A
  1. Reducing response time for a client request

2. Reducing traffic on access link

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

How would you calculate access link utilisation?
e.g. 60% of requests are satisfied at origin, with a 15.4Mbps bandwidth and average request rate from browsers to origin servers = 15Mbps

A

Data rate to browsers = 0.6 * 15Mbps = 9Mbps
Utilisation = Data rate to browsers / access link bandwidth (bps)
9 / 15.4 = 0.58

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

What is the SMTP protocol?

A

Simple mail transfer protocol - protocol between mail servers to send email messages

17
Q

Explain the process of sending mail from user agent A to user agent B and what protocols are used where

A
  1. User uses User Agent (UA) to compose message
  2. UA sends message to mail server via SMTP and is placed in message queue
  3. Client side mail server opens TCP connection
  4. SMTP client sends message over TCP connection
  5. The receiving mail server places the message in the recipient’s mail box via a mail access protocol
  6. The recipient invokes their UA to read messages
18
Q

What type of connection does SMTP use?

A

Persistent

19
Q

Give two differences and one similiarity between SMTP and HTTP

A

SMTP is a push protocol, HTTP is a pull protocol
In HTTP, each object is encapsulated in its own response message. In SMTP, multiple objects are sent in a multipart message
Both have ASCII command/response interaction and status codes

20
Q

What are mail access protocols used for? Give examples

A

The delivery/storage to receiver’s server e.g. POP3, IMAP, HTTP

21
Q

Describe the phases in POP3

A

Authorisation phase - consisting of client commands such as username + password, plus server responses such as +OK and -ERR

Transaction phase - Client commands to manipulate messages

Update phase - Server does actual deletion of messages

22
Q

Give three features that IMAP has that POP3 doesn’t

A
  1. It keeps all messages in one place (server)
  2. Allows user to organise messages into folders
  3. Keeps user state across sessions
23
Q

What is DNS used for?

A

Domain Name System (DNS) maps between IP addresses and hostnames and vice versa

24
Q

What type of database is DNS?

A

Distributed database, meaning that it is a database that is implemented in a hierarchy of many name servers in multiple locations

25
Q

What 4 services does DNS cater for?

A
  1. Hostname to IP address translation
  2. Host aliasing
  3. Mail server aliasing
  4. Load distribution - many IP addresses correspond to one name
26
Q

What levels does DNS architecture consist of?

A

Root DNS servers, top-level domain (TLD) servers, authoritative DNS servers

27
Q

Explain the steps taken when e.g. host at cis.poly.edu wants the IP address for host at gaia.cs.umass.edu in an iterative query

A
  1. Requesting host contacts local DNS (cached) server
  2. Local DNS server does not have address, so contacts root DNS server to find IP for TLD DNS server (.edu) and returns to local DNS server
  3. Local DNS server then contacts TLD DNS server (.edu) for authoritative DNS server IP
  4. TLD DNS responds with IP of authoritiative server (unmass.edu)
  5. Local DNS server contacts authoritative server (umass.edu) to retrieve IP address for gaia.cs.umass.edu
  6. Local DNS server responds to requesting host with this IP
28
Q

Explain the steps taken when e.g. host at cis.poly.edu wants the IP address for host at gaia.cs.umass.edu in a recursive query

A
  1. Requesting host contacts local DNS (cached) server
  2. Local DNS server does not have address, so contacts root DNS server to find IP for TLD DNS server (.edu)
  3. Root DNS server then contacts TLD DNS server (.edu) for authoritative DNS server IP (unmass.edu)
  4. TLD DNS server contacts authoritative server (umass.edu) to retrieve IP address for gaia.cs.umass.edu
  5. Authoritative server responds to TLD DNS with IP address, which responds to root DNS, which responds to local DNS
  6. Local DNS caches IP of gaia.cs.umass.edu and forwards back to requesting host
29
Q

What 4 types of DNS resource records are there? Give examples using store.website.com

A
A = address (store.website.com + 145.37.93.126)
NS = name server (website.com, ns1.website.com)
CNAME = canonical name (www.website.com, servereast.website.com)
MX = mail exchange (website.com, mail.store.website.com)
30
Q

Describe the steps to create a new startup called ‘Doctor Who’

A
  1. Register name doctorwho.com at DNS registrar
  2. Registrar inserts two resource records into .com TLD server:
    (doctorwho. com, dns1.doctorwho.com, NS)
    (dns1. doctorwho.com, 212.212.212.1, A)
  3. Registrar inserts two resource records into authoritative server: type A record for doctorwho.com, type MX record for mail.doctorwho.com