Lifecycle of a Request

by Ryan Oeltjenbruns

Domain.com -> [Enter]

  1. DNS Lookup
  2. Request to Server via IP
  3. Server Reception & Processing
  4. Response

Who knows which port servers respond to by default? Extra credit for HTTP requests vs HTTPS!

Answer below.

Default Server Ports

Web requests are made to port 80 (non-ssl) and 443 (ssl)

Partial credit for ports 3000, 3001, 5000, or 8000 in dev environments.

What is DNS?

The phone book of the internet.

Each time you make a request, your browser first reaches out to a DNS server to ask what a domain's IP address is.

Domain.com -> 123.45.67.89

What are the two most common IP Address versions and which one is "domain.com's"?

IPv4 & IPv6

123.45.67.89 is an example of an IPv4 Address

Request to the Server

Now that the browser knows where to find the site, it sends out a request to the IP with all of the domain information in the headers of the request.

Request is Received

Now we're in "webstack" territory.

VVV

What is a Webstack?

  • Server (Apache2, Nginx, Litespeed, etc)
  • Application (make it yourself, bro)
  • Database (Mongo, Neo4j, MySQL, MariaDB, PerconaDB, SQLite)

Also, typically in webstack acronyms, the OS is specified. Go deeper for some examples.

Common Webstacks

  • LAMP - Linux, Apache2, MySQL, PHP
  • LEMP - Linux, (E)Nginx, MySQL, PHP
  • MAMP - MacOS, Apache2, MySQL, PHP
  • WAMP - Guess =P
  • MEAN - Express, Mongo, Angular, Node
    (MEAN should probably be called an angular app on a "MEN" stack, but I digress)

Process, Render, Return

Once the server renders the request, the browser parses the response and renders appropriately.

THE END

because I didn't know this was today.

Questions?