You type "google.com" into your browser bar and press enter: what happens next?
b We'll take a deep dive down the stack, into how the Internet works to magically make Google's home page appear in our web browser. Topics will range from URL parsing & DNS resolution, through HTTP, TCP, IP & routing, and all the way back up to browser rendering.
- Foundations
I have an interview question I rather like using. I can't for the life remember who I stole it from -- I had thought it was from an Amazon employee -- but I can't find a reference offhand. It's a pretty simple question:
When I type 'www.google.com' into the location bar of my favourite browser, and press return, what happens?
It's a doozy of a technical question, I think. There are plenty of different areas and concepts involved, so it encourages a fun and interesting conversation. It gives me an idea of whereabouts in the stack the interviewee feels most comfortable (do they primarily talk about the server page generation, the intermediate communication, or the client side browser behaviour?) and their depth of knowledge in those areas. Finally, it tells me something of the candidate's communication (and teaching) skills.
Plus I always learn something new. And when you're interviewing, as Valve succinctly put it, you're looking for a 'T' shape. Somebody who has a wide breadth of experience, but has depth of experience in one particular area. So it's good to find somebody who can answer the breadth of the question and at least one area in some depth. (Ideally more depth than me because I want to learn!)
So, where to start? I find it helpful to think in terms of three different aspects:
- the passing of time;
- the entities involved; and
- the scale at which we're examining the system.
Looking at the time line at a very high scale, we get an accurate, but entirely superficial answer: the web browser goes to Google's web site, fetches the information for the page and displays it to the user.
This presentation is my take on the answer, and will cover topics like:
- how the browser interprets the string, "google.com" and determines what it is you're actually looking for;
- resolving names into IP addresses with DNS, including an overview of UDP for sending DNS requests and receiving the responses;
- the application layer: how an HTTP request is constructed;
- the transport layer: how TCP works to create a reliable bi-directional stream of data between two hosts;
- the Internet layer: how IP works to shuffle packets back and forth across the internet;
- the data link layer: how packets get from one (intermediate) host to another over a length or wire, or a wireless network;
- back up to the application layer: how HTTP responses are constructed; and
- back to the browser where the response is interpreted and the rendering engine kicks in.
It's quite a whirlwind tour!
- DevOps
- HTML/CSS
- Networking
Beginner
Being a regular user of the Internet and web browsers is almost essential, but other than that, just an interest in learning what happens behind the curtain!