The Application Layer Flashcards
What is the application layer?
the application layer is not theapplication itself, but rather a set of protocols which provide communication services to applications.
What do application layer protocols focus on?
Application layer protocols rely on the protocols at the layers below them to ensure that a message gets to where it is supposed to, and focus instead on the structure of that message and the data that it should contain.
What are the protocols used at the application layer?
There are a wide number of different application layer protocols for different use cases including HTTP, SMTP, FTP, etc.
What is a URI?
Uniform Resource Identifier(URI), is a string of characters which identifies a particular resource.
What is HTTP?
Hypertext Transfer Protocol(HTTP) is the set of rules which provide uniformity to the way resources on the web are transferred between applications.
What model of communication does HTTP use?
HTTP follows a simple model where a client makes arequestto a server and waits for aresponse. Hence, it’s referred to as arequest response protocol
What is DNS?
The Domain Name System provides a way to look up unknown server IP addresses.
What steps does DNS use?
- Enter a URL likehttp://www.google.cominto your web browser’s address bar.
- The browser creates an HTTP request, which is packaged up and sent to your device’s network interface.
- If your device already has a record of the IP address for the domain name in its DNS cache, it will use this cached address. If the IP address isn’t cached, a DNS request will be made to the Domain Name System to obtain the IP address for the domain.
- The packaged-up HTTP request then goes over the Internet where it is directed to the server with the matching IP address.
- The remote server accepts the request and sends a response over the Internet back to your network interface which hands it to your browser.
- Finally, the browser displays the response in the form of a web page.
What does it mean for a protocol to be stateless?
A protocol is said to bestatelesswhen it’s designed in such a way that each request/response pair is completely independent of the previous one. HTTP is a stateless protocol.
What affect is caused by HTTP being stateless?
Because of HTTPs statelessness, it is challenging to build stateful web applications
What is a url?
Uniform Resource Locator orURL, is the most frequently used part of the general concept of a Uniform Resource Identifier orURI, which specifies how resources are located.
What are the components of the URL:
HTTP://www.example.com:88/home?item=book
-
http
: Thescheme. It always comes before the colon and two forward slashes and tells the web client how to access the resource. In this case it tells the web client to use HTTP to make a request. -
www.example.com
: Thehost. It tells the client where the resource is hosted or located. -
:88
: Theportor port number. It is only required if you want to use a port other than the default. -
/home
: Thepath. It shows what local resource is being requested. This part of the URL is optional. -
?item=book
: Thequery string, which is made up ofquery parameters. It is used to send data to the server. This part of the URL is also optional.
What are query strings?
It is used to send data to the server as part of the URL
What is URL encoding?
URLs are designed to accept only certain characters in the standard 128-characterASCII character set. Reserved or unsafe ASCII characters have to be encoded.
URL encoding replaces these non-conforming characters with a%
symbol followed by two hexadecimal digits that represent the equivalent UTF-8 character.
What are the limitations of query strings?
- Query strings have a maximum length. Therefore, if you have a lot of data to pass on, you will not be able to do so with query strings.
- The name/value pairs used in query strings are visible in the URL. For this reason, passing sensitive information like username or password to the server in this manner is not recommended.
- Space and special characters like
&
cannot be used with query strings. They must be URL encoded, which we’ll talk about next.