Unit 7: Application Layer Flashcards
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?
- Reliable transport
- Flow control
- Congestion control
- Connection-oriented
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?
- 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?
- The cookie header line of HTTP response message
- The cookie header line in next HTTP request message
- The cookie file kept on user’s host, managed by user’s browser
- The entry on the back-end database of website
Describe the steps of setting a cookie and retrieving this at a later date
- Client makes HTTP request
- Server creates cookie ID for user and creates entry on backend database
- Server responds with ID in HTTP response ‘set-cookie’
Some time passes… - Client makes HTTP request with cookie ID
- 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
- User sends HTTP request to proxy server
- Proxy server checks for copy of object stored locally and responds immediately if it is
- If not stored locally, TCP connection is opened to origin server and a request is made
- Response is acquired from origin server and response is sent back to client
Give 3 reasons why web caching is used
- 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