So for example, the dns of google.com is a public ip which the user connects to.

Google has a huge infrastructure of web servers.

How can all of these still run on the same ip so the url is still google.com

  • 1
    en.wikipedia.org/wiki/Google_platform - This article describes the technological infrastructure behind Google's websites as presented in the company's public announcements. – DavidPostill Jul 5 '15 at 18:48
  • 1
    actually, for me, nslookup google.com is a list of 20 servers: 87.245.198.XX – befzz Jul 5 '15 at 19:43
  • 1
    There are things like geoip-based dns response and load balancing that help you do such a thing – Dan Jul 5 '15 at 20:10

I'n not positive Google uses it but Load-balance would be my guess. Not to steal anyone else information so here is a link to a thread. Explains this better then I can.

Load-balance across many servers, so you see 1 IP address but the connection gets routed to one of many servers (with fault tolerance included).

If you don't have your web servers using the same storage (common storage can be tricky, you have to use a SAN with a 'shared' filesystem like GFS, or a database) then you should enable sticky sessions which tell the router that each client will choose a server to communicate with the first time, and keep with that server. This is less fault-tolerant (but in the web you'll just have to refresh a broken connection to start over) but much easier to architect (and faster as each web server can remain independent)

The other issue you'd need in a truly fault-tolerant situation is to locate the physical servers far away from each other, which raises performance issues for most sharing designs (ie you cannot put all your servers on a SAN if they're in different countries), is to use the multiple servers approach, using a single DNS name and replicate data between them regularly. DNS load balancing is possibly the easiest way of using multiple web servers as a single website.

In these cases, the DB can often be a single database that all servers communicate with, or can be shared themselves, using clustering or more often log-shipping to ensure you have a backup ready to come online should the primary fail. Log-shipping is more common for backup servers than are located far away. [1]: https://stackoverflow.com/questions/906539/how-do-multiple-servers-work-in-sync-for-web-application

  • Load balancing is only part of it. See my comment under the question. – DavidPostill Jul 5 '15 at 19:09
  • 1
    Steve, copying text from another website, and then adding a link for the source is the preferred way here in SuperUser in case the link dies the information is not lost. I do not vote for posts that just give a link with the solution. But if you were to edit and include this post and that turns this into a good answer, then I (and possibly others) will vote for you. – LPChip Jul 5 '15 at 19:18

Google doesn't have just one IP address for google.com. E.g., If I issue an nslookup command on a Microsoft Windows system where I am at the moment, I see the following:

C:\>nslookup google.com
Server:  localhost
Address:  ::1

Non-authoritative answer:
Name:    google.com
Addresses:  2607:f8b0:4004:80d::200e

But when I connect to another system about 20 miles away where the business uses a different Internet Service Provider (ISP) and issue the same nslookup command, I see the following:

Name:    google.com

The IP or IP addresses someone sees returned when a Domain Name System (DNS) query is submitted for google.com may vary depending on the geographic location. So, if you are in Canada and I'm in the U.S., you may get the IP address of a Google server in Canada while I get the IP address of one in the U.S. Many big companies also use round-robin DNS where the IP address someone's system will use when the system queries a DNS server to translate a fully qualified domain name (FQDN), such as www.google.com, to an IP address varies from among many IP addresses in the list one sees from such an nslookup. Google appears to be doing so, since in the second example above, not just one, but many IP addresses were returned. The technique is used to load balance work among many servers. So, if I visit google.com from that site now, I might be connected to one of those IP addresses, but a different one if I again visit google.com from that same site two hours later. The Google platform Wikipedia article posted in a comment by DavidPostill states that Google uses the round robin method of balancing the load among multiple servers.

Even if you always get the same IP address for a company, that doesn't mean that you are always getting web pages from the same web server. A company may have a load balancer that uses a reverse proxy technique to pass your request for webpages on the company's sites to one of several web servers behind the load balancer.


They use Anycast. Ie the same public IP is hosted from multiple locations. The routing stack will make sure that the nearest one resolves to the client. Also this makes it easier for firewall's to whitelist one IP instead of many.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.