Flashcards in Unit 7: Application Layer Deck (30):
What is inter-process communication?
Two processes communicating within the same host, defined by the OS
How do processes in different hosts communicate?
By exchanging messages to/from the application layer via sockets
What 4 services does TCP provide?
1. Reliable transport
2. Flow control
3. Congestion control
Why is UDP sometimes preferred over TCP?
Some apps such as telephony and streaming apps can tolerate lossy data in UDP. There is also less overhead with UDP
How is HTTP stateless?
The Web/HTTP server maintains no information about past client requests
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
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
What are 2 issues with non-persistent HTTP?
1. Requires 2RTTs per object
2. OS overhead for each TCP connection
What happens in persistent HTTP that makes it different to non-persistent?
The server leaves the TCP connection open after sending a response therefore subsequent messages between same client/server are sent over open connection
What is an issue with persistent HTTP?
Open links waste resources, these should be closed after a period of time
What are the 4 components of cookies?
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
Describe the steps of setting a cookie and retrieving this at a later date
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...
1. Client makes HTTP request with cookie ID
2. Server accesses the cookie, does something with it and responds with usual HTTP response
What is the purpose of a web cache/proxy server?
To satisfy a client request without involving the origin server. Caching locally reduces network delay and traffic
Describe the steps of a user sending a HTTP request via proxy server
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
Give 3 reasons why web caching is used
1. Reducing response time for a client request
2. Reducing traffic on access link
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
Data rate to browsers = 0.6 * 15Mbps = 9Mbps
Utilisation = Data rate to browsers / access link bandwidth (bps)
9 / 15.4 = 0.58
What is the SMTP protocol?
Simple mail transfer protocol - protocol between mail servers to send email messages
Explain the process of sending mail from user agent A to user agent B and what protocols are used where
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
What type of connection does SMTP use?
Give two differences and one similiarity between SMTP and HTTP
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
What are mail access protocols used for? Give examples
The delivery/storage to receiver's server e.g. POP3, IMAP, HTTP
Describe the phases in POP3
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
Give three features that IMAP has that POP3 doesn't
1. It keeps all messages in one place (server)
2. Allows user to organise messages into folders
3. Keeps user state across sessions
What is DNS used for?
Domain Name System (DNS) maps between IP addresses and hostnames and vice versa
What type of database is DNS?
Distributed database, meaning that it is a database that is implemented in a hierarchy of many name servers in multiple locations
What 4 services does DNS cater for?
1. Hostname to IP address translation
2. Host aliasing
3. Mail server aliasing
4. Load distribution - many IP addresses correspond to one name
What levels does DNS architecture consist of?
Root DNS servers, top-level domain (TLD) servers, authoritative DNS servers
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
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
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
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)
5. TLD DNS server contacts authoritative server (umass.edu) to retrieve IP address for gaia.cs.umass.edu
6. Authoritative server responds to TLD DNS with IP address, which responds to root DNS, which responds to local DNS
7. Local DNS caches IP of gaia.cs.umass.edu and forwards back to requesting host
What 4 types of DNS resource records are there? Give examples using store.website.com
A = address (store.website.com + 18.104.22.168)
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)