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 Solutions Architect at AWS.
Hello Reader, Happy Holidays! In today's newsletter, I am going to share three tips that helped me and many of my students switch careers to the cloud and get high-paying jobs. I will also share an update about the upcoming January cohort of the AWS SA Bootcamp. Tip 1: Leverage your IT experience Your existing IT experience is NOT throwaway. Don't think you can't reuse components of your existing knowledge in your cloud journey. For example, my student Abhisekh has deep knowledge of the...
Hello Reader, In today’s post, let’s look at another correct but average answer and a great answer that gets you hired to common cloud interview questions. Question - How did you do Disaster Recovery (DR) for your AWS application? Common but average answer - I will replicate it to another region What the interviewer is looking for is how DR strategies are chosen, and what are the different strategies. As an SA, you will be responsible for talking to the app team and coming up with an...
Hello Reader, Hi from Las Vegas, USA, where I am here to present at AWS Re:Invent, the biggest cloud conference on earth. In this edition I am going to go over a BIG announcement that you should learn - Amazon EKS Autonomous Mode or EKS Auto Mode or lovingly called EKS Auto! Why is this important? Getting started with Kubernetes is hard. Sure Amazon EKS manages control plane, but you need to install core addons, select AMI, create worker node, and scale the nodes. It doesn't stop there....