Application Layer Flashcards

(97 cards)

1
Q

what are the two possible structures of network applications

A

peer to peer
client server

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

does the server ip address change

A

no

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

does the server ip address change

A

no

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

how can servers be scaled

A

farming out to data centres

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

can client ip addresses change

A

yes

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

what do clients always communicate with in client server architecture

A

servers

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

is there an always on server in peer to peer architecture

A

no

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

in peer to peer architecture, do the clients have to go through the server always

A

no

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

how do peers use each other in peer to peer architecture

A

request service from each other and provide service in return

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

as new peers are added to the peer to peer architechture, how does this affect the system

A

increases load

new peers bring new capacity to give service to each other but also more demands for service

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

do the clients always keep the same ip address in p2p archicecture

A

no

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

why is there being no centralised system a good feature of p2p architecture

A

no point of attack
harder to bring down

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

what is the client process

A

process that initiates communication

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

what is the server process

A

process that waits to be contacted

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

which processes are performed in p2p arch

A

clients can perform both client and server processes

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

examples of apps that could tolerate some loss

A

audio

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

examples of apps that need 100% reliable data transfer

A

file transfer, web applications

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

examples of apps that require low time delay to be effective

A

multi player games

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

examples of apps that require low time delay to be effective

A

multi player games

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

example of apps where timing delays are not important

A

emails

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

what is throughput

A

how much data you can put through the system

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

examples of apps that require minimum amount of throughput to be effective

A

multimedia

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

what does it mean if an app is elastic

A

make use of whatever throughput they get

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

what does URL stand for

A

uniform resource locator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
what part of the url is the host name www.someschool.edu/someDept/pic.gif
www.someschool.edu
25
what part of the url is the path name www.someschool.edu/someDept/pic.gif
/someDept.pic.gif
26
does http use udp or tcp
tcp
27
how does HTTP use TCP
- client initiates connection to server - server accepts tcp connection from client - HTTPmessages exchanged - tcp connection closed
28
what does it mean for a server to be a threading server
can have multiple clients connecting to it at once
29
what does it mean to say HTTP is stateless
server maintains no information about past clients requests
30
why is the HTTP stateless
state slows things down adds to delays and requires lots of storage
31
what is non persistent HTTP
at most 1 object can be send over TCP connection connection then closed so 100 objects requires 100 connections and 100 closes
32
what is persistent http
multiple objects can be sent over a single TCP connection
33
what is the advantage of persitant HTTP over non persistent HTTP
only needs one connection set up so quicker
34
what is the default mode of HTTP
persistent connections with pipelining
35
non persistent HTTP process outline
1. url entered 2. TCP syn request from client 3. server accepts syn request 4. client sends request as piggyback on third part of handshake 5. server responds 6. close TCP connection 7. finish connection 8. repeat for each object
36
persistent HTTP process outline
1. one tcp connection initiation 2. leave this connection open so when further requests come, send them over the same open connection
37
what is the time taken to transfer in persistent HTTP
syn = 1 rtt request = 1 rtt file transmission time 2rtt + file transmission time
38
what are the two types of HTTP messages
request and response
39
why are http requests written in ascii
human readable
40
what does status code 200 mean
ok request succeeded object later in msg
41
what does status code 301 mean
permanently moved request object moved, new location later in msg
42
what does status code 400 mean
bad request msg not understood by server
43
what does status code 404 mean
not found
44
what does status code 505 mean
HTTP version not supported
45
uses of cookies
authorisation shopping carts recommendations user session state
46
where are cookies stored
machine cookie cache
47
next time you visit a site you accepted cookies for, what happens
cookie sent along with the request
48
how can businesses use cookies to make money
demographic of users for advertising so they can still make money off you even if youre just browsing using your info and giving it to third parties
49
what is the goal of a proxy serve
to satisfy client requests without involving origin server
50
how does a proxy server work
- user sets browser to access the web via proxy - browser sends all requests to proxy server - proxy server checks cache, if the object requested for is in the cache, it returns it, otherwise it goes to the origin server to request - then this is stored in the cache
51
how does the cache act as both a client and server
server for original requesting client client to origin server
52
why is web caching used
reduce response time for requests reduce traffic on main server
53
why is a cache a better solution than making a fatter access link
cheaper
54
what does it mean if the cache hit rate is 40%
40% of the requests are satisfied at cache, the other 60% have to use the access link to go to the origin servers
55
what is the conditional GET
will get from cache if the modified last date is before a specified date
56
what does DNS stand for
domain name system
57
examples of top level domains
.co.uk .com .org .ie
58
what type of hierarchy does DNS have
tree
59
what protocol is DNS ran over
UDP
60
what are canonical names
complicated names are required for servers but sometimes we want a simple naming scheme these are canonical names
61
what are the DNS services
- host name to IP address translation - host aliasing - mail server aliasing - load distibution
62
how does load distribution in DNS work
goes to a geographically closer server when redirected
63
what does the root name server do
returns list of IP addresses for responsible TLD servers
64
what does TLD stand for
top level domain
65
are the root servers often contacted
no
66
what is one level below top level domain servers
authoritative DNS servers
67
examples of organisations that would control their own dns servers (authorative dns servers)
google amazon trinity
68
example of college local DNS
scsss.tcd.ie
69
what are local DNS also called
default name server
70
path from root to local dns
root => tld => auth => local
71
what is an iterated query
if the contacted server does not have the answer, it replies with the name of the server to contact instead
72
what is a recursive query
if the contacted server does not have the answer, it contacts the next server
73
what does TTL stand for
time to live
74
what is resource record format
(Name, TTL, Type, Data)
75
what are the different types of resource records
A = ipv4 AAAA = ipv6 NS = name server eg domain (url) CNAME = canonical name MX = email exchange
76
what are some examples of the flags in a DNS message
query or repsonse recursion desired
77
what are the two types of DNS attacks
DDoS Redirect
78
what is a DDoS attack
bombard root servers with traffic
79
why have DDoS attacks not been successful to date
local DNS servers cache IPs of TLD servers allowing root server bypass
80
how do redirect attacks work
intercept queries
81
why is peer to peer file distribution quicker than client server model file distribution
peers can both upload and download so can propogate among the peers server must sequentially send N copies of the file until all the nodes in the network have the file bottleneck is minimum download rate of one of clients, so as more clients added, time gets slower more clients in p2p brings more capacity to the service
82
what are files divided into in BitTorrent
chunks
83
what is a torrent
group of peers exchanging chunks of a file
84
what happens when a peer first joins the torrent
contact the tracker gets list of peers and connects to a subset of them peers who give more data become preferred peers no chunks to begin with but will accumulate them over time from other peers
85
what is churn in torrent
when peers come and go in the system
86
what chunks do peers aim to get
the rarest ones in the system in order to help the other peerrs
87
how is the preferred peers system kept fair
re evaluated every 10 seconds every 30 seconds randomly select another peer to start sending to in the hopes that it will send back
88
what happens in synchronous web applications when user wants to load new page
must wait for page to load while this is happening, the user cannot interact
89
how does asynchronous web applications work
loads data in the background, so the page can update without a wait time
90
example of ajax trigger
mouse scroll to end of page
91
how does a typical ajax request work
user clicks event handler XHR object generated XHR object requests page from server in the background when the data gets back the XHR object fires an event and displays the data
92
how does the websocket protocol differ from AJAX
the server does not have to wait for the client to send a request web socket, the server can also talk to the client and they can speak quickly to each other via messages both parties can start sending messages at any time
93
examples of uses of web sockets
smart plug viewing ring doorbell footage from phone
94
how do client and server establish connection in web socket protocol
web socket handshake HTTP request with upgrade header
95
what does duplex mean in web socket protocol
either client or server can start sending messages at any time
96
what efficiencies are there in web socket protocol
much less control data and overhead as messages are short requests can start in either direction