8 ms·
What happens behind the scenes when we type www.google.com in a browser? (2015)
- MrXOR 7y agoAnother similar context: https://github.com/alex/what-happens-when https://github.com/alex/what-happens-when https://news.ycombinator.com/item?id=8902105 https://news.ycombinator.com/item?id=8902105 https://news.ycombinator.com/item?id=9189096 https://news.ycombinator.com/item?id=9189096
- jimmaswell 7y agoI would've liked to see ps/2 keyboards gone over. I still use one.
- 420codebro 7y agoLol based. Top kek.
- notyourwork 7y agoDo you plug it into a USB port or a ps/2 port on motherboard?
- jimmaswell 7y agoThe motherboard.
- tingol 7y agoCould you expand on why? Just curious.
- jimmaswell 7y agoI bought it at a yard sale ~10 years ago and it still works
- 0815test 7y agoDoesn't it depend on the browser? Does Google Chrome still do that thing where if you fire the browser up and then type www.google.com in it, it actually searches Google for that string and returns a results page, instead of just browsing there?
- pedrocx486 7y agoDoesn't happen to me, at least didn't happen in a while.
- chromeguy66 7y agoThe behaviour of the URL bar is modifiable in most modern browsers. The default on most is automatic detection of URLs - if something looks like an URL, it's treated like one and if it doesn't, it searches your search engine of choice.
- EE84M3i 7y agoI think this would be better if it had more details about font rendering and layout engines.
- jdbernard 7y agoI agree. We should fork it, flesh out those details and submit a pull request. :)
- unixpickle 7y agoOf course, google in particular is behind a very complex distributed network. Distributed DBs are mentioned, but it would be cool to know more about how web requests are distributed and routed in this system.
- notyourwork 7y agoIt most likely depends on what resource you are referring to. If its a search query that will differ drastically from a gmail request. Therefore, its really case specific in monolithic companies with distributed and decentralized architecture.
- devonkim 7y agoYou could start with the Maglev paper but I’m not sure if that’s still in production use there https://ai.google/research/pubs/pub44824 https://ai.google/research/pubs/pub44824
- ibdkhb 7y agoI did this years ago so it might be different now, but I blocked google.com and some subdomains at the firewall, found a document hosted on google docs (google.com domain) link in google.co.uk search result, clicked it and instead of the link failing due to it being blocked at the firewall, a google.se (swedish) server started sending the ip traffic for the blocked document to come down. I never tried blocking google.se and then repeating to see what other google domain would send the document next, but its clear Google have written their own routing to get information around some restrictions beit deliberate or misconfigured. Its also an excellent way to probe what servers have blocks in place or not, ie censorship. Its also pretty much instant rerouting ie subsecond, so their ability to pass instructions to other servers in a timely manner is obvious. I wonder if their servers are using swarm intelligence in area's or not? They did custom build their own machines, which would have given them the opportunity to tear up the rule book some what.
- inevitable2 7y agoMisleading... this is what happens WITH EVERY site. What we want to know is...: "What happens behind the scenes when we type www.google.com in a browser?"
- mandeepj 7y agorelevant - https://www.google.com/search/howsearchworks/?fg=1 https://www.google.com/search/howsearchworks/?fg=1
- RyanShook 7y agoA lot is written about the algorithms and search results from Google but I haven’t seen much on crawling and indexing. I imagine there are multiple teams in Google who help maintain the integrity and completeness of their indexes but would love to know more about it considering it might be the largest single repository of knowledge.
- shereadsthenews 7y agoI believe email is significantly larger than the web. Wouldn't that be your largest repo of knowledge, in aggregate?
- RyanShook 7y agoYes, I agree. I just meant the Google index is probably the largest centralized collection of knowledge. Maybe not though, just a guess.
- PaulHoule 7y agoWhen you type www.google.com into a web browser they strangle a puppy.
- 333c 7y agoThis isn't a constructive comment. Elaborate why you dislike Google/Google Search, in a way that adds to the discussion. I think there are many valid reasons, and this isn't one.
- adtac 7y agoI'm pretty sure that was just a joke
- 333c 7y agoFrom the HN Guidelines[0]: > Don't be snarky. Comments should get more thoughtful and substantive, not less, as a topic gets more divisive. > Please don't post shallow dismissals, especially of other people's work. [0]: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- pgcj_poster 7y agoThe way I read it, this person wasn't criticizing Google Search but was rather saying that it's stupid to type in www.google.com because you can search from the url bar directly.
- 333c 7y agoAh, perhaps. That wasn't clear to me.
- deleted 7y ago[deleted]
- turtles 7y agoIn the TLS handshake: "The server generates its own hash, and then decrypts the client-sent hash to verify that it matches" The server decrypts a hash? But thats not how hashes work.
- goochtek 7y agoIt should read "then compares the generated hash to the hash that was received from the client to verify that it matches" Or something along those lines.
- turtles 7y agoI assume the reason for doing this is to confirm the symmetric key now in use is known between both parties?
- tialaramex 7y agoI wrote it above, but more relevant here maybe: No. There's no need to confirm that, if the keys don't match everything will fail anyway and the connection aborts because everything either party sends appears to be gibberish. The description linked over-simplifies, the hash they're calculating is a summary of the handshake process by which keys are agreed, we want to prove that both saw the _same_ process happen to reach this state. Suppose I am willing to use archaic method A because I'm a simpleton, although I do know methods C and E which are safer. The wise people running www.google.com only allow method A if you don't know methods B, C, D or E. Now, I try to connect to www.google.com and unknown to me a Bad Guy is in the middle. I say "Hello, I know methods A, C and E", but the bad guy changes that message to say "Hello, I know method A only". Google replies "OK I guess we can do method A then" and we use method A. The Bad Guy knows how to break method A and now my security is ruined! But with this Finished message in TLS, www.google.com and I will calculate different hashes, since I know I said "I know methods A, C and E" but www.google.com got a message from me saying "I know method A only" and those don't hash the same. This proves somebody is tampering with our connection, we must abort.
- 7y ago
- 0xEFF 7y agoDo you find this an useful interview question in 2019? What is or isn’t useful about the answer from candidates?
- Blackthorn 7y agoI do. If a candidate is a frontend developer and can't tell me anything beyond the absolute basics of how http works, that spells trouble.
- owenmarshall 7y agoI like it, especially for interviewing for ops/devops/sre/whatever we say today. It’s a good warm up question because pretty much any answer is right, and it quickly lets the candidate get to their comfort zone. It is also amenable to be simplified or tweaked - if the candidate doesn’t know much about CDNs or layer 7 load balancing or whatever, you just move past them. And you can change some of the parameters to be sure the candidate isn’t just memorizing the answer sheet. It can also give a strong signal where the candidate’s knowledge is weak: if you talk to me at length about Apache throwing read syscalls to pull files from the disk but quickly gloss over the networking bits, that might indicate you don’t know them well.
- GauntletWizard 7y agoThis is precisely what I use it for, and precisely why I like answering it. I will talk in detail about the bits I know, smell bullshit (and look up answers) in the bits I don't, and it gives me an answer to candidates depth in all of them. Backend devs will talk about search and set theory algorithms. SREs will talk protocols. Networking guys will talk layer3-7. Everyone has their own style, and it's certainly the most informative in determining where to prove next. A good candidate had breadth and depth of knowledge. This one question shows breadth and tells you where to find depth. It doesn't work as well for pure frontend people, but only barely - I almost expect frontend people to understand interrupts and syscalls on that end.
- devonkim 7y ago
- AndrewStephens 7y agoI love a good reductionist deep dive into things we use everyday. This is a great overview to a wide range of topics. I wrote something similar a couple of years ago[0] which skips the keyboard and display but goes further into the world of IP packet transmission (and HTTP/2). The parent link is better written though. [0] https://sheep.horse/2017/10/how_you_are_reading_this_page.html https://sheep.horse/2017/10/how_you_are_reading_this_page.ht...
- ryanf323 7y agoVery comprehensive. However, it is missing how the client machine will ARP the gateway for the MAC address if it is not in its tables.
- jamesmcintyre 7y agoI worked with the guy who wrote this repo. He's one of the smartest, nicest, and genuinely curious guys I know. He also ran teams and his leadership style was very humble and encouraging in a workplace that was, at times, the opposite. So glad to see he's still publishing awesome content like this. Be sure to check out some of his other popular repos, great stuff!
- mayakumar 7y agoI roger that. His name is `Vasanth Krishnamoorthy`. I still have the good fortune of working with him in `WalmartLabs`. Extremely talented, multi-faceted, curious and above all a wonderful human being. I have learnt plenty through my interactions with him and am still learning from him :-). I am serendipitously lucky to have met him in my life.
- techslave 7y agoi invented this question circa 2009. i have to assume, one of many that independently invented it. in my version, it’s not “what is behind the scenes “, it’s “tell me everything you can in as much detail as you like, what has to happen to visit www.google.com”. of course in 2009 google had only just become google.com.
- shereadsthenews 7y agoI've noticed that when anyone claims to have invented something on HN, they get voted down. But I have no reason to doubt it. Please tell us more about how you came to use this question, and why you think it wasn't in circulation before that. I know someone asked me this in an interview in 2010, so it was in wider use by then.
- toast0 7y agoEdit: rewritten without snark I was interviewed on this in 2004 for Yahoo! although the hostname in question was different.
- macintux 7y agoYou mean 1999 perhaps?
- techslave 7y agoARGH! too late to edit. of course i meant 1999 not 2009.
- beamatronic 7y agoI used to work with some guys from Taos Consulting. They asked a similar interview question. “What happens when you ping Google”. Your answer was expected to take at least 3 hours.
- yread 7y agoI also got asked a similar question in a an interview (as a programmer) and I answered it well and they hired me. But I think it's an absolutely terrible question for judging whether a person will be a good hire.
- tianshuo 7y agoThis is almost the same open-ended interview questions I've used for many years, works a charm because it filters the engineers from the chaff (who just copy-pastes code from the internet w/o understanding why)
- mrunkel 7y agoMe too. This gives a quick insight into what the applicant knows and what they are interested in. This is usually one of the three questions I require as part of an application. The other two are a technical question tailored for the position and the third a 'throwaway' that the applicant answer as they see fit. In the past it's been things like "What is the airspeed of an unladen swallow? (European or African)"
- dev_north_east 7y ago> "What is the airspeed of an unladen swallow? (European or African)" What are you expecting to get from something like that?
- mrunkel 7y agoEither they get the reference and say something funny in response, they don't get the reference and google it, or they ask a question like "what are you expecting from something like that?" In any case, it's a chance to show themselves as a person.
- maaaats 7y agoYeah, if you don't understand how the browser has implemented lexical analysis, it surely means you only copy paste code /s
- davidmr 7y agoThat seems like an uncharitable conclusion. I think most people worth hiring (in an interview where that question is asked) should be able to expound at some length on at least some part of the process. What part of the process they spend the most time talking about is an interesting window into their experience.
- amelius 7y agoIf only we knew!
- fouronnes3 7y agoIt's amazing how detailed this is, and yet there are still steps missing!
- xurukefi 7y agoThe most amazing part about this is that regardless of how much more details one would want to put into it, it is probably practically infeasible to make it complete. It's a wonderful example to demonstrate the importance of the concept of abstraction in CS.
- vinayms 7y agoThe main problem with these kinds of exposition topics is that the steps involved are quite dense. By that I mean something like density of real numbers; between any two real numbers there are any number of real numbers. Then, the writer just chooses to expand on those steps that they are comfortable with, or the ones that get more eyeballs. I mean, why not explain how signal travels across various media like air, underwater cables, to and from satellite etc? Now, don't get me wrong, I am not saying this is useless. I am just saying that if one chooses to give a 30k feet perspective, they had better stay there and not bounce between 40K and 10K.
- bgravinz 7y agoI’m not seeing not sticking to 30k is really detrimental to how most people would likely consume a doc like this, which would probably be to sample various parts to find what they’re interested in and then dig in.
- tempguy9999 7y agoI would most politely wish to note that one is tended to read documents. One should rarely consume them unless in the spirit of espionage. Equally, in the comfort of one's own parlour, one may listen to one's wireless. Not 'consume', as was once heard. The butler informs me on this occasion that I am correct. I bow to him in this. Uncommonly sharp fellow. And so to the Drone's Club, where literature, wireless nor dolly birds are permitted.
- deleted 7y ago[deleted]
- theandrewbailey 7y agoI remember an interview where I answered a similarly in-depth question about what happens when you load a file, from file system traversal, down to the heads moving across the platter (because almost no one used SSDs in 2009).