Tutorial 1 of 8 · System design · Building blocks · Intermediate
What happens when you open a website
Follow one click from the browser to a server and back, and see where the time goes.
6 lessons, the last is a challenge · about 1 h · Diagrams, with Python and Java
Before you start
You can write a function in Python or Java that takes values and returns a result, and you have used a dictionary (a map in Java) to look a value up by its key.
You have met classes working together in the Low-level design path and read rows from a table with SELECT in the Databases and SQL path. Neither is needed in detail here: a database is the place a server keeps its data.
1Describe what happens between typing a website's name and seeing the page: the address lookup, the connection, the request, the server's work and the response.
2Read and complete a request handler: a method and a path go in, a status code and a body come out, with 200 for a product that exists and 404 for one that does not.
3Add up where the time goes on a first visit and on a repeat visit, and count the address lookups when the answer is remembered for a fixed time.
4Work out how many requests one server finishes per second, and how fast the waiting line grows when more than that arrive.