Chapter 2: Application Layer

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Last-modified (HTTP)

- Header line, indicates the time and date when the object was created or last modified. - Critical for object caching, both in the local client and in network cache servers (also known as proxy servers)

User-agent: (HTTP)

- Header line, specifies the user agent, that is, the browser type that is making the request to the server. (such as Mozilla/5.0, a Firefox browser). - Useful because the server can send different versions of the same object to different types of user agents.

Connection: close (HTTP)

- Header line, the browser is telling the server to close the connection after sending the requested object

NS (RR Type)

- If Type = ______, then Name is a domain (such as foo.com) and Value is the hostname of an authoritative DNS server that knows how to obtain the IP addresses for hosts in the domain. - This record is used to route DNS queries further along in the query chain. - For example, (foo.com, dns.foo.com, ____) is a Type ____ record

CNAME (RR Type)

- If Type = ______, then Value is a canonical hostname for the alias hostname Name. - The record can provide querying hosts the canonical name for a hostname. - For example, (foo.com, relay1.bar.foo.com, _____) is a _____ record.

MX (RR Type)

- If Type = ______, then Value is the canonical name of a mail server that has an alias hostname Name. - _______ records allow the hostname of mail servers to have simple aliases. - By using _____ record, a company can have the same aliased name for its mail server and for one of its other servers (such as its Web server) - To obtain the canonical name for the mail server, a DNS client would query for a _______ record; to obtain the canonical name for the other server, the DNS client would query for the CNAME record - For example, (foo.com, mail.bar.foo.com, _____) is a ____ record.

A (RR Type)

- If Type =_____, then Name is a hostname and Value is the IP address for the hostname. - Thus a ____ provides the standard hostname-to-IP address mapping - For example, (relay1.bar.foo.com, 145.37.93.126, ___) is a Type _____ record.

Web servers

- Implement the server side of HTTP, house Web objects, each addressable by a URL. - Always on, with a fixed IP address, and it services request from potentially millions of different browsers

Answer section (DNS message)

- In reply from a DNS server, the _____ contains the resource records for the name that was originally queried - A reply can return multiple RRs in the ______, since a hostname can have multiple IP addresses (for example, for replicated Web servers)

Security

- In the sending host, a transport protocol can encrypt all data transmitted by the sending process, and in the receiving host, the transport-layer protocol can decrypt the data before delivering the data to the receiving process

Stateless protocol

- Maintains no information about the clients - Ex: HTTP

DNS caching

- A critically important feature of the DNS system that is exploited to improve the delay performance and to reduce the number of DNS messages ricocheting around the Internet. - In a query chain, when a DNS server receives a DNS reply (containing, for example, a mapping from a hostname to an IP address) it can cache the mapping in its local memory.

Domain Name System (DNS)

- A distributed database implemented in a hierarchy of ________ servers - An application-layer protocol that allows hosts to query the distributed database - Runs over UDP and uses port 53 - Commonly employed by other application-layer protocols - including HTTP and SMTP to translate user-supplied hostnames to IP address - Provides additional services: host aliasing, Mail server aliasing, and Load distribution

Host aliasing

- A host with a complicated hostname can have one or more alias names. For example, a hostname such as relay1.west-coast.enterprise.com could have two aliases such as enterprise.com and www.enterprise.com. In this case, the hostname relay1.west-coast.enterprise.com is said to be a canonical hostname. - DNS can be invoked by an application to obtain the canonical hostname for a supplied alias hostname as well as the IP address of the host.

Web cache (or proxy server)

- A network entity that satisfies the HTTP requests on the behalf of an origin Web server. Has its own disk storage and keeps copies of recently requested objects in this storage. - Both a server and client at the same time. When it receives requests from and send responses to the browser, it is a server. When it sends requests to and receives responses from an origin server, it is a client

Socket

- A process sends messages into, and receives messages from, the network through a software interface called a _______. - The interface between the applications process and the transport-layer protocol. - Analogous to door, sending process shoves a message out door - Sending process relies on transport infrastructure on other side of door to deliver messages to socket at receiving process

Processes

- A program that is running within an end system that communicates. - Can creates and receives messages.

The Four problems of Centralized design for DNS

- A single point of failure, if DNS server crashes, so does the entire internet - Traffic volume - Distinct centralized database, one location creates delays over congested links - Maintenance , would have to keep records of all Internet hosts. Not only huge on storage, but updates for new hosts. (in short it does not scale)

Cookies

- Allow sites to keep track of users. Most major commercial Web sites use _____ today.

loss-tolerant applications

- An application which it's transport-layer protocol doesn't provide reliable data transfer, some of the the data sent by the sending protocol may never arrive at the receiving process. - Ex: conversational audio/video

Port number

- An identifier that specifies the receiving process in the destination host. - 80 for Web servers and 25 for email servers - A ________ is a way to identify a specific process to which an Internet or other network message is to be forwarded when it arrives at a server. For the Transmission Control Protocol and the User Datagram Protocol, a ________ is a 16-bit integer that is put in the header appended to a message unit.

Hyper-text transfer protocol (HTTP)

- Application layer protocol that defines the format and sequence of messages exchanged between browser and Web server - Defined in RFC 1945 and RFC 2616 - Implemented in two programs: a client program and a server program - Defines how Web clients request Web pages from Web servers and how servers transfer Web pages to clients - Uses TCP as its underlying protocol - Stateless

Persistent without pipelining

- Client issues new request only after previous response has been received - One RTT for each reference object

Persistent with pipelining

- Client sends requests as soon as it encounters a referenced object - as little as one RTT for all the referenced objects

Question section (DNS message)

- Contains information about the query that is being made. - This section includes (1) a name field that contains the name that is being queried, and (2) a type field that indicated the type of question being asked about the name- for example, a host address associated with a name (Type A) or the mail server for a name (Type MX)

Load distribution

- DNS is also used to perform ________ among replicated servers, such as replicated Web servers. - Busy sites, such as cnn.com, are replicated over multiple servers, with each server running on different end systems and each having a different IP address. - For replicated Web servers, a set of IP addresses is thus associated with one canonical hostname. -DNS rotation, distributes the traffic among the replicated servers

Local DNS server

- Does not strictly belong to the hierarchy of DNS servers but is nevertheless central to the DNS architecture - Each ISP has a _______ (also called a default name server) - When a host connects to an ISP, the ISP provides the host with the IP address of one or more of its _________ (typically through DHCP). - When a host makes a DNS query, the query is sent to the ______________, which acts a proxy, forwarding the query into the DNS server hierarchy

Non-persistent connections

- Each TCP connection is closed after the server sends the object- the connection does not persist for other objects. - Each TCP connection transports exactly one request messages and one response message, so suffers a delivery delay of two RTTs - HTTP/1.0 uses _____ HTTP

Top-level domain (TLD) servers

- For each of the top-level domains (com, org, edu) and country top-level domains (uk, fr, cs, and jp) there is a ________ server (or server cluster). - Provide the IP address for authorative DNS servers

Reliable data transfer

- Guaranteed data delivery service between applications. - When a transport protocol provides this service, the sending process can just pass data into the socket and know with complete confidence that the data will arrive without errors at the receiving process.

Conditional GET

- HTTP mechanisms that allows a cache to verify that its objects are up to date.

Accept-language: (HTTP)

- Header line, indicates the the user prefer to receive a language specific version of the object, if such an object exists on the server; otherwise, the server should send its default version. - One of many content negotiation headers available in HTTP.

Date (HTTP)

- Header line, indicates the time and date when the HTTP response was created and sent by the server. - Note that this is not the time when the object was created or last modified; it is the time when the server retrieves the object from its file system, inserts the object into the response message, and sends the response message.

Web Browsers

Implement the client side of HTTP

Self-scalability (P2P)

In a P2P file-sharing application, although peer generates workloads by requesting files, each peer also adds service capacity to the system by distributing files to other peers.

Client and server process

In the context of a communication session between a pair of processes, the process that initiates the communication (that is, initially contacts the other process at the beginning of the session) is labeled as the client. The process that waits to be contacted to begin the session is the server.

P2P architecture

In this architecture, there is minimal (or no) reliance on dedicated servers in data centers. Instead the applications exploits direct communication between pairs of intermittently connected hosts, called peers. Cost efficient, since they normally don't require significant server infrastructure and server bandwidth.

TCP Services

Includes: - a connection-oriented service - a reliable data transfer service - flow control (sender won't overwhelm receiver) - Congestion control (throttle sender when network is overloaded) - does not provide: timing, minimum throughput guarantee, security

Two reasons Web caching is deployed on the Internet

1) A Web cache can substantially reduce the response time for a client request, particularly if the bottleneck bandwidth between the client and the origin server is much less than the bottleneck bandwidth between the client and the cache. If there is a high-speed connection between the client and the cache, as there often is, and if the cache has the requested object, then the cache will be able to deliver the object rapidly to the client. 2) Web caches can substantially reduce traffic on an institutions access link to the Internet. By reducing traffic, the institution doesn't have to upgrade bandwidth as quickly, thereby reducing costs

Four component of a cookie

1) A cookie header line in the HTTP response message 2) A cookie header line in the HTTP request message 3) a cookie file kept on the user's end system and managed by the user's browser 4) a back-end database at the Web site

Timing

An example guarantee might be that every bit that the sender pumps into the socket arrives at the receivers socket no more than 100 msec later. - Ex: interactive real-time applications, internet telephony, virtual environments, teleconferencing, and multiplayer gaming. - long delay makes it seem less realistic

Header Section (DNS Message)

The first 12 bytes in a DNS message that has a number of fields - Fields: identification, Flags, and four number-of fields that indicate the number of occurrences of the four types of data sections that follow the ______. - Flags,

HTTP Request Message Format

The first line is called the request line, the subsequent lines are called the header lines, then a blank line (carriage return and line feed ), lastly the Entity body, carriage return and line feed (\r\n) at start of line indicated end of header lines

Entity body

The meat of the message- it contains the requested object itself.

Persistent connections

With HTTP 1.1 __________, the server leaves the TCP connection open after sending a response. Subsequent requests and responses, between the same client and server can be sent over the same connection.

Pull protocol

The TCP connection is initiated by the machine that wants to receive the file.

Push Protocol

The TCP connection is initiated by the machine that wants to send the file.

DELETE method (HTTP)

The ____ method allows a user, or an application, to delete an object on a Web server

PUT method (HTTP)

The ____ method is often used in conjunction with Web publishing tools. It allows user to upload an object to a specific path (directory) on a specific Web server. Also used by application that need to upload object to the Web server.

MX record

The _____________ permits a company's mail server and Web server to have identical (aliased) hostnames; for example, a company's Web server and mail server can both be called enterprise.com.

bandwidth

The bit-rate of available or consumed information capacity expressed typically in metric multiples of bits per second

Reliable data transfer service

The communication process can rely on TCP to deliver all data sent without error and in the proper order. When one side of the application passes a stream of bytes into a socket, it can count on TCP to deliver the same steam of bytes the receiving socket, with no missing or duplicate bytes.

Two reasons DNS is an application-layer protocol

(1) Runs between communication end systems using the client-server paradigm and (2) relies on an underlying end-to-end transport protocol to transfer DNS messages between communication end systems

When a browser in a user's hosts is instructed to retrieve a specific video (identified by the URL), the CDN must intercept the request so that it can (2 things):

(1) determine a suitable CDN server cluster for that client at that time, and (2) redirect the client's request to a server in that cluster.

rarest first

(BitTorrent method) The idea is to determine, from among the chuncks the user does not have, the chunks that are the rarest among the users neighbors and then request those chunks first.

optimistically unchoked

(BitTorrent) Every 30 seconds, the user picks one additional neighbor at random and sends it chunks.

unchoked

(BitTorrent) Gives priority to the neighbors that are currently supplying data at the highest rate and selects these to send chunks of data to.

clientSocket.sendto(message.encode(), (serverName, serverPort))

- Converts the message from string type to byte type, as we need to send bytes into a socket, this is done with the encode() method. - The ______ method attaches the destination address (serverName, serverPort) to the message and sends the resulting packet into the process's socket, clientSocket.

Additional section (DNS message)

- DNS message section that contains other helpful resources - For example, the answer section field in a reply to an MX query contains a resource record providing the canonical hostname of a mail server. The _________ contains a Type A record providing the IP address for the canonical hostname of the mail server

clientSocket = socket(AF_INET, SOCK_DGRAM)

- Used to create socket - The first parameter indicates the address family; in particular, AF_INET indicates that the underlying network is using IPv4. - The second parameter indicates that the socket is of type SOCK_DGRAM, which means it is a UDP socket (rather than a TCP socket).

modifiedMessage, serverAddress = clientSocket.recvfrom(2048)

- With this line, when the packet arrives from the Internet at the client's socket, the packet's data is put into the variable modifiedMessage and the packet's source address is put into the variable serverAddress (both server's IP address and port number). - The method ______ also takes the buffer size 2048 as input. (This buffer size works for most purposes.)

message = raw_input('Input lowercase sentence')

- ________ is a built in function in Python. When this command is executed the user at the client is prompted with the words "....". The user then uses his keyboard to input a line, which is put into the variable message.

IP address

A 32-bit quantity that we can think of as uniquely identifying the host.

private CDN

A CDN owned by the content provides itself

third-party CDN

A CDN that distributes content on behalf of multiple content providers

Distributed Hash Table (DHT)

A _____ is a simple database with the database records being distributed over the peers in a P2P system.

registrar

A commercial entity that verifies the uniqueness of the domain name, enters domain name into the DNS database, and collects a small fee from you for it's services

Object

A simple file - such as an HTML file, a JPEG image, a Java applet, or a video chip- that is addressable by a single URL.

POST method (HTTP)

An HTTP client often uses the ____ method when the user fills out a form - for example, when a user provides search words to a search engine. With a ______ message, the user still requesting a Web page from the server, but the specific contents of the Web page depends on what he user enter into the form fields. If the value of the method field is _______, then the entity body contains what the user entered into the form fields.

cluster selection strategy

At the core of any CDN deployment is _______, that is, a mechanism for dynamically directing clients to a server cluster or a data center within the CDN

Enter Deep

CDN placement philosophy, pioneered by Akamai, is to _____ into the access networks of Internet Service Provides, by deploying server clusters in access ISPs all over the world.

Bring Home

CDN placement philosophy, taken by Limelight and many other CDN companies, is to (1) _____ the ISPs (2) _____ by building large clusters at a smaller number (for example, tens) of sites. Instead of getting inside the access ISPs these CDNs typically place their clusters in Internet Exchange Points (IXPs). Results in lower maintenance and management overhead, possibly at the expense of higher delay and lower throughput to end users.

Real-time measurements

CDNs can instead perform periodic _______ of delay and loss performance between their clusters and clients.

Authority section (DNS message)

DNS message section that contains records of other authoritative servers

CDN's typically adopt one of two different server placement philosophies:

Enter Deep or Bring Home

HTTP Response Message Format

Format that consists of first a status line, second the header lines, the blank line, lastly the entity body.

Dynamic Adaptive Streaming over HTTP (DASH)

In ____, the video is encoded into several different versions, with each version having a different bit rate and, correspondingly, a different quality level. The client dynamically requests chunks of video segments of a few seconds in length. When the amount of available bandwidth is high, the client naturally selects chunks from a high-rate version; and when the available bandwidth is low, it naturally selects from a low-rate version. The client selects different chunks one at a time with HTTP GET request messages.

geographically closest

One simply strategy is to assign the client to the cluster that is _______. Using commercial geo-located databases (such as Quova and MaxMind), each LDNS IP address is mapped to a geographic location.

Root DNS servers

Over 400 root name servers scattered all over the world, provide the IP addresses of the TLD servers

Two types of HTTP messages

Request and response messages.

P2P application challenges

Security, performances, and reliability due to their highly decentralized structure

HEAD method (HTTP)

Similar to the GET method. When a server receives a request with the _____ method, it responds with an HTTP message but it leaves the requested object out. Application developers often use the ____ method for debugging

301 Moved Permanently: (HTTP)

Status code and associated phrase, Requested object has been permanently moved; the new URL is specified in Location: header of the response message. The client software will automatically retrieve the new URL.

200 OK: (HTTP)

Status code and associated phrase, request succeeded and the information is returned in the response.

TCP connection-oriented service

TCP has the client and server exchange transport-layer control information with each other before the application-level messages begin to flow. This so-called handshaking procedure alerts the client and server, allowing them to prepare for an onslaught of packets. After the handshaking phase, a TCP connection is said to exist between the sockets of the two processes. The connection is a full-duplex connection in that the two processes can send messages to each other over the connection at the same time. When the application finishes sending messages, it must tear down the connection.

manifest file

The HTTP server has a _____, which provides a URL for each version along with its bit rate. The client must first request the ______ and learns about the various versions. The client then selects one chunk at a time by specifying a URL and byte range in an HTTP GET request message for each chunk.

Round-trip time (RTT)

The time it takes for a small packet to travel from the client to the server and back to the client

distribution time(P2P)

The time it takes to get a copy of the file to all N peers.

serverSocket.bind(('', serverPort))

This line binds the port number, serverPort, to the server's socket.

clientSocket.close()

This line closes the socket. The process then terminates.

print(modifiedMessage.decode())

This line prints out modifiedMessage on the user's display, after converting the messages from bytes to string.

nslookup program

a network administration command-line tool available for many computer operating systems for querying the Domain Name System to obtain domain name or IP address mapping or for any other specific DNS record

Three differences between HTTP and SMTP

1) HTTP is a pull protocol and SMTP is push protocol. 2) SMTP requires each message, including the body of each message, to be in 7-bit ASCII format. HTTP does not impose this restriction. 3) HTTP encapsulates each object in its own HTTP response. message. SMTP places all the message's objects into one message.

Three distributed, hierarchical DNS databases

- Root DNS servers, Top-level domain, and Authorative DNS servers - -

Resource records(RRs)

- The DNS serves that together implement the DNS distributed database store ___________, including ____ that provide hostname-to-IP address mappings. - Each DNS reply message carries one or more __________. - ______ is a four-tuple that contains the following fields: (Name, Value, Type, TTL)

Status line

- The first line in an HTTP response message. - Has three fields: Version (sp) status code (sp) phrase (cr)(lf)

Request line (HTTP)

- The first line of an HTTP request message - Consist of three fields Method (space) URL (space) Version (cr lf)

GET method (HTTP)

- The majority of HTTP request messages use the _____ method. The ______ method is used when the browser request an object, with the requested object identified in the URL field.

Header lines (HTTP)

- The subsequent lines after the request line. - The ____ line Host: www.someschool.edu specifies the host on which the object resides. - The information provided is required by web proxy cache.

User Datagram Protocol (UDP) Services

- ________is a no-frills, lightweight transport protocol, providing minimal services. - Connectionless so there is not handshaking before the two processes start to communication. - ________ provides unreliable data transfer service- that is, when a process sens a message into a ______socket, _______ provides no guarantee that the message will ever reach the receiving process. Also may arrive out of order. - Does not provides a congestion-control mechanism, flow control, throughput guarantee, security, or connection setup

Content Distribution Networks (CDNs)

- a geographically distributed network of proxy servers and their data centers, thereby localizing much of the traffic

Application architecture

Designed by the application developer and dictates how the application is structure over the various end systems.

An HTTP request message is a so-called conditional GET message if:

1) the request message uses the GET method 2) the request message includes an If-Modified-Since: header line

Application layer protocol 4 definitions

1) the types of messages exchanged, for example, request messages and response messages 2) The syntax of the various message types, such as the fields 3) The semantics of the fields, that is, the meaning of the information in the fields 4) Rules for determining when and how a process sends messages and responds to messages

bandwidth-sensitive applications

Applications that have throughput requirements

Elastic applications

Applications that make use of as much, or as little, throughput as happens to be available.

Web Page

Consists of objects

Mail server aliasing

DNS can be invoked by a mail application to obtain the canonical hostname for a supplied alias hostname as well as the IP address of the host.

Application layer protocol

Defines how an application's processes, running on different end systems, communicate with each other.

Authoritative DNS servers

Every organization with publicly accessible hosts (such as Web servers and mail servers) on the Internet must provide publicly accessible DNS records that map the names of those hosts to IP addresses.

Data center

Facility used to house computer systems and associated components, such as telecommunications and storage systems.

Method field values (HTTP)

GET, POST, HEAD, PUT, and DELETE.

Set-cookie: (HTTP)

Header line which contains the cookie identification number.

Server: (HTTP)

Header line, indicates that the message was generated by (Apache Web) _______; it is analogous to the User-Agent: header line in the HTTP request message

Content-Type: (HTTP)

Header line, indicates that the object in the entity body is HTML text (indicated by this header and not by the file extension).

Content-Length: (HTTP)

Header line, indicates the number of bytes in the object being sent

DNS Messages Format

Header section, question section, answer section, authority section, and additional section

Flags (Header section field for DNS message)

Part of the header section of a DNS Message, _______ such as: - A 1-bit query/reply _______ indicates where the message is a query(0) or a reply (1) - A 1-bit authoritative _______ is set in a reply message when a DNS server is an authoritative server for a queried name. - A 1-bit recursion-desired _______ is set when a client (host or DNS server) desires that DNS server perform recursion when it doesn't have the record. A 1-bit recursion-available field is set in reply if the DNS server supports recursion

Identification (Header section field for DNS message)

Part of the header section, the first field is a 16-bit number that identifies the query. This identifier is copied into the reply message to a query, allowing the client to match received replies with sent queries.

Message

Processes on two different end systems communicate with each other by exchanging _______ across the computer network.

Interprocess communication

Processes running on the same end system using rules that are governed by rules that are governed by the end system's operating system.

Four dimensions of transport-layer protocol services

Reliable data transfer, throughput, timing, and security

505 HTTP Version Not Supported: (HTTP)

Status code and associated phrase, the requested HTTP protocol version is not supported by the server.

404 Not Found: (HTTP)

Status code and associated phrase, the requested document does not exist on the server.

400 Bad Request: (HTTP)

Status code and associated phrase, this is a generic error indicating that the request could not be understood by the server.

Throughput

The rate at which the sending process can deliver bits to the receiving process.

Client-server architecture

There is an always-on hosts, called the server, which services requests from many other hosts, called clients


Kaugnay na mga set ng pag-aaral

CH. 21 - THE MODERN WORLD: 1800-1945

View Set

NUR 414 quiz questions throughout semester

View Set

Another Time Another Place Vocab and Questions

View Set

CHAP 8: Earthquakes + Earth's Interior *

View Set

California Real Estate Principles: Ch. 11

View Set