This is an example of a broad type of question that could lead in any direction. You can talk about all sort of things: maybe DNS to start with – what are DNS servers? How do they work at a high level or a lower level? Lookups. Primary and Secondary servers. Caching. TTLs. Change propagation. DNS records. A records. CNAMEs. MX records. And that’s just DNS. We’ve not hit a load balancer or web server or app server yet.
Although “there is a DNS lookup that tells the browser the IP address of the server that will respond to this request” is a good starting point, skillful interviewers might lead you down one or two rabbit holes to see whether you know more than the bullet point. Thirty seconds into your response you might be onto TCP, HTTP, transport layers, SSL, certificate chains – who knows? You’re not expected to be Google and if the role involves building JavaScript libraries, a gap (or abyss) in your knowledge of transport layers is likely not going to kill your chances, but it’s always good to show that you know there’s more going on than just how much of the internet npm downloads when you build that 50 line JS file you’ve just written. If you are a JavaScript engineer working on client-side code, it would not be unreasonable to expect that you have some depth to your understanding of how a web browser works – since that’s effectively the platform that you’re writing your code for.