Skip to content

Level One#


To get the best out of this book's advanced topics and to help yourself with your career in IT, you should have a good understanding of some basic concepts and technologies. Without this foundamental knowledge, you'll struggle with the more advanced topics and your career growth will be weak.

Please trust me when I say that understanding the fundamentals is going to be very important for your career. If you build your career on shallow, weak foundations then you're going to struggle to debug problems in the future, which people will notice, and you'll be relegated to normal, non-critical duties.

This can be demonstrated by breaking down a web service, backwards:

  1. A client connects to a website at website.tld
  2. The client sends an HTTP request of GET /index.html HTTP/1.1
  3. website.tld resolves to the IPv4 address 1.2.3.4
  4. The web server is a process running on a server at 1.2.3.4
  5. The process has created 4 threads
  6. Each thread waits for HTTPS connections on port TCP/443
  7. Each thread is a set of instructions executing on one of the 4 cores
  8. Each thread shares a set of RAM with the web server's code and other assets
  9. The website served to clients is stored in /var/html/public/
  10. The filesystem type is ext4
  11. The operating system is Linux (Ubuntu)
  12. The hardware has a quad core CPU, 16GB of RAM, 2x 250GB NVMe SSDs and a 10Gb NIC

That's going from the hardware (at the bottom) to the very top, where we serve the client a website. There are a lot of key phrases and technologies here for you to learn and understand.

Business want people who understand the above "stack" of information.

This course is about understanding that information.

A disaster#

Let's look at a disaster scenario, which will further build on the above.

You've come into work one day and you're told employees cannot access your company portal website: portal.mycompany.corp. You're told the error is, "HTTP 502 Bad Gateway". You get to work debugging the problem.

After visiting the website you see the same HTTP 502 error.

A few things will come to the mind of someone who has not studied and come to understand fundamental networking concepts:

  1. What is HTTP?
  2. What does the number 502 have to do with HTTP?
  3. What is being referred to by "Bad Gateway"?

If your fundamental networking knowledge is sound you'll know that:

  1. HTTP is Hypertext Transfer Protocol and operates on ports TCP/80 (and TCP/443 over TLS, also known as HTTPS)
  2. The 502 is an HTTP 502 response code; looking up the code you'll see it means "Bad Gateway" which in turn means, "... 502 Bad Gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server"
  3. And so now you know the gateway is the backend server that provides your portal

So what steps does well informed administrator take?

  1. Resolve the DNS of portal.mycompany.corp to understand what possible HTTP servers are serving the HTTP 500 response
  2. Investigate what back end or upstream address/IPs and port(s) those HTTP servers forward or proxy the traffic to
  3. Determine if those upstream servers are online and serving the correct traffic on the correct port
  4. Check if the process is running or reporting errors in an error log
  5. If the process isn't running, use information from systemd to determine why it crashed
  6. Try to restart the service and restore the portal
  7. From there, debug why the application on the upstream systems is not serving traffic correctly, if it's still down

And so on.

The moral of this story is this: knowing what an HTTP 502 Bad Gateway error is, because you have fundamental networking knowledge, means you can quickly diagnose technical problems and solve them. The opposite of this is spending a lot of time looking embarrassed whilst you struggle to understand the problem and try to resolve the problem by turning it off and on again (this is actual advice I've seen people apply.)

This course is designed to help you understand the WTF of everything you just read.

It's time to read on, starting with the basic hardware that makes all of this "magic" come together.