The second week of CST 311 focused on the application layer and
several of its protocols. This post provides a brief summary of HTTP, SMTP, and DNS.
The HyperText Transfer Protocol (HTTP) controls the transfer of files between clients and websites. HTTP uses the transport-layer protocol TCP to communicate between end systems. TCP is a natural protocol to use for HTTP, as reliable delivery of both requests and responses is necessary for a pleasant web-viewing experience. HTTP clients can send several different requests to the server:
- GET: Requests a specific webpage or file from the server.
- POST: Submits client-side form data to the server.
- HEAD: Requests the header of an object, omitting the object data itself
- PUT: Uploads a file to the server.
- DELETE: Deletes a file from the server.
The Simple Mail Transfer Protocol (SMTP) is one of the oldest application protocols, and one of the most popular. SMTP enables the sending, and, to a certain extent, the receival of email. SMTP is a “push” protocol, meaning a client initiates a connection with a remote mail server, and subsequently sends an email over that connection. Importantly, SMTP does not define a way to download email from a mail server to a user agent, such as a laptop or smartphone. Other protocols need to be used to transfer emails from the mail server to user agents – IMAP, and HTTP for web-based email services, are common examples.
The Domain Name System (DNS) is responsible for converting human-readable hostnames to Internet protocol (IP) addresses. In brief, the domain name system employs a vast network of DNS servers to store a distributed database. This database is tiered – at the top are the root name servers, in the middle are the top-level domain (TLD) servers, and at the bottom are the authoritative servers. The root servers know the hostnames and IP addresses of the TLD servers, the TLD servers know the hostnames and IP addresses of the authoritative servers, and the authoritative servers know the hostnames and IP addresses of the servers they track. When a hostname needs to be translated into the corresponding IP address, this distributed database is queried using the DNS protocol. It is important to note that the DNS protocol relies heavily on caching to keep the system from being overloaded. The local DNS resolver service on a client caches previously queried IP addresses, as do local DNS servers hosted by ISPs. After a certain expiry period, usually called the time to live (TTL), cached DNS entries are purged and queried again the next time they are needed. Due to DNS’s aggressive reliance on caching, it can take up to 2 days for an update to propagate through the entire network.
No comments:
Post a Comment