2: Application Layer Flashcards

1
Q

how do the client-server and p2p architectures differ?

A

C-S
server is an always on host, with a permanent IP address. data centers are used to scale
clients comm. with server, intermittent connections. have dynamic ip addresses and dont communicate directly with each other

P2P
no always on server
arbitrary end systems comm. with each other
peers
self scalable - more peers bring more capability
peers are intermittenly connected and change IP addresses - complex management!

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

how is a process addressed?

A

combination of port no and ip address. some are standardised like HTTP server 80 and mail server 25

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

what does the app layer protocol define?

A

the type of message e.g. request response
message sytnax
message semantics
rules for when and how processes send and respond

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

how does tcp differ to udp

A
tcp has reliable transport
flow control
congestion control
connection oriented
but doesnt provide timing, min throughput guarantee or security
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how do we secure TCP?

A

using SSL, which provides an encrypted TCP connection, data integrity and end-point authentication.

SSL is at app layer, apps use SSL libraries that talk to TCP.

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

what transport protocol does HTTP use?

A

TCP

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

HTTP is stateful/stateless? why is this good?

A

stateless. stateful protocols are complex. if a client or server crashes, their view of state may be inconsistent

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

how is non-persistent HTTP different to persistent HTTP?

A

in non-p http
client initiates tcp connection, server accepts
client sents http request, server responds
server closes tcp connection
repeated for each object on the url

the response time is 2RTT (one for initiate one for request) + file transmission time

requires overhead for each tcp connection. browsers will often often parallel connections

in p http the server leaves the connection open after sending its response, subsequent messages use the same connection

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

what are the HTTP status codes?

A
200 ok
300 moved, new location specified later
400 bad request - didnt understnad
404 not found
505 http version not supported
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

how can we emulate state in HTTP

A

using cookies! cookies identifier stored on users browser and cookies themselves stored in backend db to allow a cookie-specific state
can be used for authorization, carts, recommendations

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

what is the function of a web cache? why?

A

to satisfy client requests without involving thje origin server. requests are made to the cache instead and if the object is there then its returned, else fetches it from origin. cache acts as a client and a server. usually installed by an ISP.

why?
reduces response time for client request
reduces traffic on the access link

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

how can HTTP levrage caches?

A

using conditional get, only get from server if its been updated

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

what are the 3 components of email? what are the steps?

A

user agents: outlook etc
mail servers: contains mailboxes for users, message queues.
SMTP simple mail transfer protocol
uses tcp

user agent to mail server open tcp with recipeint server to server to user agent

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

how is DNS structured? give example about how amazon.com might be accessed

A

a distributed database in a hierachy of many name servers

client queiries root server to find com DNS server
clien then queiries com DNS to get amazon DNS server
client queries amazon DNS to get ip for amamazon.com

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

what are TLD and authoratitive DNS servers, and local DNS?

A

TLD - top level domain
responsible for com, org, net, edu, aero, jobs, museums, and all top-level
country domains, e.g.: uk, fr, ca, jp

authoritative DNS servers:
• organisation’
s own DNS server(s), providing authoritative hostname to IP
mappings for organisation’
s named hosts 

Local DNS name server
• does not strictly belong to hierarchy
• each ISP (residential ISP, company, university) has one
• also called “default name server”
• when host makes DNS query, query is sent to its local DNS
server
• has local cache of recent name-to-address translation pairs (but may
be out of date!)
• acts as proxy, forwards query into hierarchy

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

how do recursive and iterated DNS queries differ

A

recursive: burden on the contacted name server
iterated: local DNS sorts it all

17
Q

how can we speed up dns?

A

recall that DNS servers have caches

18
Q

how can we reduce the load of video streaming?

A

using redundancy within and between images to decrease the number of bits used to encode the image

spatial: Within image
temporal: from one image to the next

19
Q

what is DASH?

A

dynamic, adaptive streaming over HTTP
• server:
• divides video file into multiple chunks
• each chunk stored, encoded at different rates
• manifest file: provides URLs for different chunks
• client:
• periodically measures server-to-client bandwidth
• consulting manifest, requests one chunk at a time
• chooses maximum coding rate sustainable given
current bandwidth
• can choose different coding rates at different
points in time (depending on available bandwidth
at time)

“intelligence” at client: client determines
• when to request chunk (so that buffer starvation, or overflow does not
occur)
• what encoding rate to request (higher quality when more bandwidth
available)
• where to request chunk (can request from URL server that is “close”
to client or has high available bandwidth)

20
Q

what is the motivation behind a CDN?

A

how to stream content (selected from millions of
videos) to hundreds of thousands of simultaneous users?

single, large “mega-server”
• single point of failure
• point of network congestion
• long path to distant clients
• multiple copies of video sent over outgoing link

• option 2: store/serve multiple copies of videos at multiple
geographically distributed sites (CDN)
• enter deep: push CDN servers deep into many access networks
• close to users
• used by Akamai, 1700 locations
• bring home: smaller number (10’s) of larger clusters in POPs near
(but not within) access networks
• used by Limelight