|
Hello Reader, One of the most popular interview question is what happens when you type an URL? Let's find out. So obviously when you type in URL like www.amazon.com, you see the website in your computer or your mobile phone. The interviewer wants to know what happens under the hood so that you can see this website. Core Concept At the end of the day, everything is a computer to computer interaction. So in a very rudimentary level, amazon.com is running on bunch of Amazon EC2s. Those EC2s are exposed by Elastic Load Balancer service, and the DNS name amazon.com is hosted in Amazon Route 53. And there is an alias record where amazon.com is pointing to an Elastic Load Balancer. For your computer to interact with this load balancer. You need the IP address of the load balancer. So the core of this question is how does when you type amazon.com, your computer gets the IP address of this load balancer. With this knowledge in mind, let's go through the steps: Step 1 : You type amazon.com in the browser Step 2 : First, your computer check the cache if you have the IP address already saved. First, it checks in your browser cache. If it is not found there, it checks the operating system cache. If it is not found there, it checks the router in your home and if it is not found there, it goes to your internet service provider cache. Let's say the IP address is not found for amazon.com in any of those cache. Then it goes to DNS resolver. This DNS resolver is typically managed by your internet service provider, such as a cable internet provider, DSL broadband provider, or a corporate network. If you are typing this on your office laptop, this DNS resolver does a recursive DNS lookup and asks multiple DNS servers around the internet, which in turn asks more DNS servers for the DNS record until it is found. This part is confusing, so let's take a deeper look. Step 3 : Your DNS resolver checks with the DNS root name server by asking "hey, do you have the IP address for amazon.com?". This DNS root name server says "I do not have the IP address for amazon.com, but I am going to give you the name server which has the IP address for all the .com domains". So once DNS resolver gets the name server for .com, it goes to that nameserver for .com TLD or top level domain. This name server tracks what DNS provider has amazon.com. So it says "I don't have the IP address for amazon.com, but I have the Amazon Route 53 Nameserver that is hosting this amazon.com". So DNS resolver, after getting the address of this Amazon Route 53 goes and asks Amazon Route 53 "Hey, do you have the IP address for Amazon.com?". And since amazon.com is hosted on Route 53, it sends the IP address of the load balancer. And at this point, DNS resolver sends IP address to your computer. Also, it caches this IP address in the DNS resolver. So next time someone comes for amazon.com, it doesn't have to go through all these recursive DNS queries and can directly return to the user. Now, in this case, we assume that amazon.com is hosted on Amazon Route 53. But even if that's not the case, let's say your URL is hosted on GoDaddy or another DNS hosting server. This DNS recursive lookup by DNS resolver will finally go to that DNS hosting server and get the IP address for the server or the URL you are looking for. All right. Going back to the flow now! Step 4 : Your computer now knows the IP address to which it needs to go. So your computer invokes that IP address which ends up in the elastic load balancer that's distributing traffic to the Amazon EC2 servers. Step 5 and 6 : And in return it sends the HTML, CSS, and JS content to your laptop and your laptop renders the web page for Amazon.com. If you open up developer settings on the browser, you will see when you type amazon.com; it returns a bunch of HTML, CSS, JavaScript, etc. All these are coming from the web servers (EC2s) running amazon.com. Now you know how the websites are displayed when you type in a URL. All right guys and gals, this is a very, very important interview question. Please understand the flow! And then you are all set to go for the interview ๐๐. If you have found this newsletter helpful, and want to support me ๐: Checkout my bestselling courses on AWS, System Design, Kubernetes, DevOps, and more: Max discounted linksโ AWS SA Bootcamp with Live Classes, Mock Interviews, Hands-On, Resume Improvement and more: https://www.sabootcamp.com/โ
Keep learning and keep rocking ๐, Raj |
Free Cloud Interview Guide to crush your next interview. Plus, real-world answers for cloud interviews, and system design from a top AWS Solutions Architect.
Hello Reader, I just unveiled the SA Bootcamp. The bootcamp covers everything you need to become an SA in as little as 3 months and spoiler alert its not just technical. This Bootcamp is a one of its kind because its taught by a Top SA still working on world class projects. And good news - it already worked for last cohort's students who secured cloud jobs in top FAANG companies, and some of them didn't even have cloud experience ๐ฐ. This SA bootcamp offersโฆ a proven blueprint for the fastest...
Hello Reader, Are you thinking about becoming an AWS SA? The demand for AWS Solutions Architects has never been higher. And the data indicates it will continue to rise because there are literally trillions of dollars worth of projects currently running on legacy technologies that need to be migrated to the cloud. SA Bootcamp is developed to be the most direct and guided route to become a Solutions Architect and get a high paying cloud job. In as little as 3 months you could be an AWS SA...
Hello Reader, Happy New Year 2026 to you and your family ๐. 2025 was a big year for me both professionally and personally. My biggest achievements of 2025 are delivering critical customer projects that YOU use in your life, starting a Start Up, and helping my students succeed. In this email, I will share some highlights and lessons that helped me: If you live in the US, you have certainly used one of the projects I have architected. When a commercial airplane pilot goes up or down, or turn...