Application Layer Flashcards

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
Q

what part of the url is the host name

www.someschool.edu/someDept/pic.gif

A

www.someschool.edu

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

what part of the url is the path name

www.someschool.edu/someDept/pic.gif

A

/someDept.pic.gif

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

does http use udp or tcp

A

tcp

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

how does HTTP use TCP

A
  • client initiates connection to server
  • server accepts tcp connection from client
  • HTTPmessages exchanged
  • tcp connection closed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

what does it mean for a server to be a threading server

A

can have multiple clients connecting to it at once

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

what does it mean to say HTTP is stateless

A

server maintains no information about past clients requests

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

why is the HTTP stateless

A

state slows things down
adds to delays and requires lots of storage

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

what is non persistent HTTP

A

at most 1 object can be send over TCP connection

connection then closed

so 100 objects requires 100 connections and 100 closes

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

what is persistent http

A

multiple objects can be sent over a single TCP connection

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

what is the advantage of persitant HTTP over non persistent HTTP

A

only needs one connection set up so quicker

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

what is the default mode of HTTP

A

persistent connections with pipelining

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

non persistent HTTP process outline

A
  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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

persistent HTTP process outline

A
  1. one tcp connection initiation
  2. leave this connection open so when further requests come, send them over the same open connection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

what is the time taken to transfer in persistent HTTP

A

syn = 1 rtt
request = 1 rtt
file transmission time

2rtt + file transmission time

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

what are the two types of HTTP messages

A

request and response

39
Q

why are http requests written in ascii

A

human readable

40
Q

what does status code 200 mean

A

ok
request succeeded
object later in msg

41
Q

what does status code 301 mean

A

permanently moved

request object moved, new location later in msg

42
Q

what does status code 400 mean

A

bad request
msg not understood by server

43
Q

what does status code 404 mean

A

not found

44
Q

what does status code 505 mean

A

HTTP version not supported

45
Q

uses of cookies

A

authorisation
shopping carts
recommendations
user session state

46
Q

where are cookies stored

A

machine cookie cache

47
Q

next time you visit a site you accepted cookies for, what happens

A

cookie sent along with the request

48
Q

how can businesses use cookies to make money

A

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
Q

what is the goal of a proxy serve

A

to satisfy client requests without involving origin server

50
Q

how does a proxy server work

A
  • 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
Q

how does the cache act as both a client and server

A

server for original requesting client

client to origin server

52
Q

why is web caching used

A

reduce response time for requests

reduce traffic on main server

53
Q

why is a cache a better solution than making a fatter access link

A

cheaper

54
Q

what does it mean if the cache hit rate is 40%

A

40% of the requests are satisfied at cache, the other 60% have to use the access link to go to the origin servers

55
Q

what is the conditional GET

A

will get from cache if the modified last date is before a specified date

56
Q

what does DNS stand for

A

domain name system

57
Q

examples of top level domains

A

.co.uk
.com
.org
.ie

58
Q

what type of hierarchy does DNS have

A

tree

59
Q

what protocol is DNS ran over

A

UDP

60
Q

what are canonical names

A

complicated names are required for servers but sometimes we want a simple naming scheme

these are canonical names

61
Q

what are the DNS services

A
  • host name to IP address translation
  • host aliasing
  • mail server aliasing
  • load distibution
62
Q

how does load distribution in DNS work

A

goes to a geographically closer server when redirected

63
Q

what does the root name server do

A

returns list of IP addresses for responsible TLD servers

64
Q

what does TLD stand for

A

top level domain

65
Q

are the root servers often contacted

A

no

66
Q

what is one level below top level domain servers

A

authoritative DNS servers

67
Q

examples of organisations that would control their own dns servers (authorative dns servers)

A

google
amazon
trinity

68
Q

example of college local DNS

A

scsss.tcd.ie

69
Q

what are local DNS also called

A

default name server

70
Q

path from root to local dns

A

root => tld => auth => local

71
Q

what is an iterated query

A

if the contacted server does not have the answer, it replies with the name of the server to contact instead

72
Q

what is a recursive query

A

if the contacted server does not have the answer, it contacts the next server

73
Q

what does TTL stand for

A

time to live

74
Q

what is resource record format

A

(Name, TTL, Type, Data)

75
Q

what are the different types of resource records

A

A = ipv4
AAAA = ipv6
NS = name server eg domain (url)
CNAME = canonical name
MX = email exchange

76
Q

what are some examples of the flags in a DNS message

A

query or repsonse

recursion desired

77
Q

what are the two types of DNS attacks

A

DDoS

Redirect

78
Q

what is a DDoS attack

A

bombard root servers with traffic

79
Q

why have DDoS attacks not been successful to date

A

local DNS servers cache IPs of TLD servers allowing root server bypass

80
Q

how do redirect attacks work

A

intercept queries

81
Q

why is peer to peer file distribution quicker than client server model file distribution

A

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
Q

what are files divided into in BitTorrent

A

chunks

83
Q

what is a torrent

A

group of peers exchanging chunks of a file

84
Q

what happens when a peer first joins the torrent

A

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
Q

what is churn in torrent

A

when peers come and go in the system

86
Q

what chunks do peers aim to get

A

the rarest ones in the system in order to help the other peerrs

87
Q

how is the preferred peers system kept fair

A

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
Q

what happens in synchronous web applications when user wants to load new page

A

must wait for page to load

while this is happening, the user cannot interact

89
Q

how does asynchronous web applications work

A

loads data in the background, so the page can update without a wait time

90
Q

example of ajax trigger

A

mouse scroll to end of page

91
Q

how does a typical ajax request work

A

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
Q

how does the websocket protocol differ from AJAX

A

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
Q

examples of uses of web sockets

A

smart plug
viewing ring doorbell footage from phone

94
Q

how do client and server establish connection in web socket protocol

A

web socket handshake

HTTP request with upgrade header

95
Q

what does duplex mean in web socket protocol

A

either client or server can start sending messages at any time

96
Q

what efficiencies are there in web socket protocol

A

much less control data and overhead as messages are short

requests can start in either direction