Application Layer Flashcards
Network Application is
Any application running on one host providing communication to the application running on the other host. Helps to manage and monitor network traffic, analyze data
Describe client-server architecture
In client-server architecture, one remote process acts as a client and requests some resources from another application process acting as server
Describe Peer-to-peer architecture
Both remote processes are executed on the same level and exchange data using shared resources
In client-server architecture, server is
Always on host, one or many permanent IP addresses, data centers for scaling
In client-server architecture, client
May Communicate with the server, maybe intermittently connected, have dynamic IP addresses, do not communicate directly with each other
A system can acts as client and server simultaneously? True or False? Why?
If same host? If different host?
True. One process acts as a server, another as a client.
Communicate with each other via interprocess communication. If host different - exchange messages
What are sockets? How are sockets identified? What is the size of identifier?
Process sends and receives messages via the socket. Port numbers to identify the socket. 32-bit
Which of the following is not the TCP services? (Multiple answers):
Reliability, flow control, congestion control, timing, minimum throughput, security, connection-orientedness
Timing, minimum throughput, securoty
Which of the following is not the UDP services? (Multiple answers):
Reliability, flow control, congestion control, timing, throughput guarantee, security, connection setup
ALL
Web page URL contains
Host name, path name
Two features that make HTTP is simple, but powerful because of:
use of TCP, statelessness
How does the TCP used in HTTP?
- client initiates TCP connection (creates socket) to server, port 80
- server accepts TCP connection from client
- HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server)
- TCP connection closed
What does stateless means in HTTP
No information about the client’s previous requests
What are the two types of HTTP connections? Describe each of them
Non-persistent HTTP: one object sent over TCP connection
Persistent HTTP: multiple objects sent over a TCP connection
What is RTT? How many RTTs does Non-persistent HTTP have? For what steps are RTTs calculated? What is the non-persistent HTTP response time?
RTT (definition): time for a small packet to travel from client to server and back. One to initiate connection, one RTT for HTTP request and first few bytes of HTTP response. 2RTT + file transmission time
Compare Non-persistent and persistent HTTP in terms of RTTs?
Non-persistent HTTP takes 2 RTTs for a single object, while Persistent needs only one RTT for all referenced objects
What are 2 types of HTTP messages?
Request, Response
What is the content of request message? What each part of the message have?
Single request line and multiple header lines. Request line has method, URL and HTTP Version fields.
Header lines have host, user agent, condition fields
What kind of HTTP methods exist?
GET, POST, HEAD
How does a browser know if browsers wants to use persistent connection?
Include Connection: keep-alive in header
Entity body method is used with what method
POST method to fill out the form and send it to the server
What are the differences between HTTP 1.0 and HTTP 1.1
HTTP 1.1 has PUT and DELETE, to upload and delete file to/in path specified in URL field
Which method in HTTP is used for debugging?
HEAD
What are the sections of HTTP response message?
Status, header, data
Status line has what kind of fields?
Protocol version field, Status code and status message.
What do the following status codes mean: 200 301 400 404 505
200 - OK 301 - Moved Permanently 400 - Bad Request 404 - Not found 505 - HTTP version not supported
What is the cookie?
User-server interaction, small bit of information that travels from browser to the web server.
What is the cookie used for?
Personal tracking, authentication, personalization, user session state, recommendation, shopping carts
Describe each component of cookie and what it is responsible for
- Header line in the HTTP response message
- Header line in the next HTTP request message
- Cookie file kept on user’s host, managed by the user browser
- Back-end database on the server
Which feature of HTTP simplifies the implementation of cookies?
Statelessness
What does a site do when a client initially visits their website?
When initial HTTP requests arrive at site, site creates a unique ID and entry in the backend for the ID.
How to keep state of a cookie?
Protocol endpoints: maintain state at sender/receiver at multiple transactions
cookies: http messages carry state
Is an email system synchronous or asynchronous?
Asynchronous
Three major components of email are? Describe each of them
User agents, mail servers, simple mail transfer protocol(SMTP)
Who is the user agent in emails?
Just a default user, who reads and sends messages
What is the mail server in emails? What does the mail server have?
The component that forms the core of email infrastructure. Has mailbox containing messages, mail queue for outgoing mail messages, SMTP protocol between mail servers to send email messages.
Mail servers use TCP? True or False?
True
What is the port that SMTP use?
25
How are the emails transferred? Is it persistent or not-persistent?
Three phases: handshaking(establishing connection), transfer of messages, closure. Persistent
What is the main similarity of SMTP and HTTP
Use command/response interaction
Is there any restriction of email messages? How is this restriction solved?
7-bit ASCII. Solved via MIME.
What is the purpose of DNS?
To identify servers. Maps between IP address and the name.
What is the DNS? How is it implemented?
Implemented in the hierarchy of many name-servers? Application-Layer protocol, core Internet protocol. DNS can only employ other by application layer protocol like HTTP, SMTP to translate user supplied host names to IP addresses
List the DNS services?
- Hostname to IP address translation
- Host Aliasing(host can have one or more alias names)
- Mail Server Aliasing
- Load distribution(many IP addresses can correspond to one name)
Why one should not centralize the DNS?
- Single point of failure
- Traffic Volume
- Distant Centralized Database
- Maintenance
Doesn’t scale
What does root name server do?
Contact authoritative name server if does not know the mapping, get the mapping, return mapping to local name server
What are the types of DNS?
Root name server, authoritative name server, local(default) name server
What is the top level domain server do?
responsible for com, org, net etc.
What is the authoritative domain server?
organization’s own DNS server for providing the authoritative host name to IP mappings for organization’s named hosts
List each name resolution method and describe each of them? Which is better? Why?
iterated and recursive. iteratively and recursively :).
Why is the caching needed in DNS?
To store the mappings
What are the types in DNS records? What are the domains of A, NS, MX and CNAME?
Identifiers responsible for identifying the domain and the parameters required
IP Address, Name server, mail service and canonical name
Peer to Peer Architecture is?
No always on server, arbitrary end systems directly communicate, peers can change IP addresses
What is the formula for distribution time in client servers?
N file copies
F file
u_s upload speed of server
d_min minimum client download rate
D_cs >= max(NF/u_s, F/d_min)
What is the formula for distribution time in P2P?
N file copies
F file
u_s upload speed of server
d_min minimum client download rate
u_max(maximum upload rate) is u_s + sum(u_i)
D_p2p >= max(F/u_s, F/d_min, NF/u_max)
extra assignment problem 1
extra assignment problem 1
extra assignment problem 2
extra assignment problem 2