Google uses largedata center facilities to providetheir services, which combine large drives, computer nodes organized in aisles of racks, internal and external networking, environmental controls (mainly cooling and humidification control), and operations software (especially as concernsload balancing andfault tolerance).
There is no official data on how manyservers are in Google data centers, butGartner estimated in a July 2016 report that Google at the time had 2.5 million servers. This number is changing as the company expands capacity and refreshes its hardware.[1]
Google plans to invest US$15 billion to build a 1 GW data center campus in Visakhapatnam, including US$2 billion for renewable energy infrastructure. It is expected to be the company’s largest data center project in Asia.[77]
2 × 300 MHz dualPentium II servers donated byIntel, they included 512 MB of RAM and 10 × 9 GB hard drives between the two. It was on these that the main search ran.
F50 IBMRS/6000 donated byIBM, included 4 processors, 512 MB of memory and 8 × 9 GB hard disk drives.
Two additional boxes included 3 × 9 GB hard drives and 6 x 4 GB hard disk drives respectively (the original storage for Backrub). These were attached to the Sun Ultra II.
SSD disk expansion box with another 8 × 9 GB hard disk drives donated by IBM.
Homemade disk box which contained 10 × 9 GBSCSI hard disk drives.
The state of Google infrastructure in 2003 was described in a report byLuiz André Barroso,Jeff Dean, andUrs Hölzle as a "reliable computing infrastructure from clusters of unreliable commodity PCs".[79]
At the time, on average, a single search query read ~100MB of data, and consumed CPU cycles. During peak time, Google served ~1000 queries per second. To handle this peak load, they built a compute cluster with ~15,000 commodity-class PCs instead of expensive supercomputer hardware to save money. To make up for the lower hardware reliability, they wrotefault tolerant software.
The structure of the cluster consists of five parts. Central Google Web servers (GWS) face the public Internet. Upon receiving a user request, the Google Web server communicates with a spell checker, an advertisement server, many index servers, many document servers. Each of the four parts responds to a part of the request, and the GWS assembles their responses and serves the final response to the user.
The raw documents were ~100 TB, and the index files were ~10 TB. The index files are sharded, and each shard is served by a "pool" of index servers. Similarly, the raw documents are also sharded. Each query to the index file results in a list of document IDs, which are then sent to the document servers to retrieve the title and the keyword-in-context snippets.
There were several CPU generations in use, ranging from single-processor 533 MHzIntel-Celeron-based servers to dual 1.4 GHz IntelPentium III. Each server contained one or more hard drives, 80GB each. Index servers have less disk space than document servers. Each rack had twoEthernet switches, one per side. The servers on each side interconnected via a 100-Mbps. Each switch had a ~250 MB/sec uplink to a central switch that connected to all racks.
The design objectives include:
Use low-reliability consumer hardware and make up for it with fault-tolerant software.
Maximize parallelism, such as by splitting a single document match lookup in a large index into aMapReduce over many small indices.
Partition index data and computation to minimize communication and evenly balance the load across servers, because the cluster is a large shared-memory machine.
Minimize system management overheads by developing all software in-house.
Pick hardware that maximizes performance/price, not absolute performance.
Pick hardware that has highthoroughput over highlatency. This is because queries are served with massive parallelism, with very few dependent steps and minimal communication between servers, so high latency does not matter.
Due to the massive parallelism, scaling up hardware scales up the thoroughput linearly, i.e. doubling the compute cluster doubles the number of queries servable per second.
The cluster is made of server racks at 2 configurations: 40 x1u per side with 2 sides, or 20 x2u per side with 2 sides. The power consumption is 10 kW per rack, at a density of 400 W/ft^2, consuming 10MWh per month, costing $1,500 per month.
As of 2014, Google has used a heavily customized version ofDebianLinux. They migrated from a Red Hat-based system incrementally in 2013.[80]
The customization goal is to purchase CPU generations that offer the best performance per dollar, not absolute performance. How this is measured is unclear, but it is likely to incorporate running costs of the entire server, and CPU power consumption could be a significant factor.[81] Servers as of 2009–2010 consisted of custom-made open-top systems containing two processors (each with several cores[82]), a considerable amount of RAM spread over 8 DIMM slots housing double-height DIMMs, and at least two SATA hard disk drives connected through a non-standard ATX-sized power supply unit.[83] The servers were open top so more servers could fit into a rack. According to CNET and a book byJohn Hennessy, each server had a novel 12-volt battery to reduce costs and improve power efficiency.[82][84]
[needs update]According to Google, their global data center operation electrical power ranged between 500 and 681megawatts by 2010.[85][86] The combined processing power of these servers might have reached from 20 to 100petaflops in 2008.[87]
Details of the Google worldwide private networks are not publicly available, but Google publications[88][89] make references to the "Atlas Top 10" report that ranks Google as the third largest ISP behindLevel 3.
In order to run such a large network, with direct connections to as many ISPs as possible at the lowest possible cost, Google has a very openpeering policy.[90]
From this site, we can see that the Google network can be accessed from 67 public exchange points and 69 different locations across the world. As of May 2012, Google had 882 Gbit/s of public connectivity (not counting private peering agreements that Google has with the largest ISPs). This public network is used to distribute content to Google users as well as to crawl the internet to build its search indexes.The private side of the network is a secret, but a recent disclosure from Google[91] indicate that they use custom built high-radixswitch-routers (with a capacity of 128 × 10Gigabit Ethernet port) for thewide area network. Running no less than two routers per datacenter (for redundancy) we can conclude that the Google network scales in the terabit per second range (with two fully loaded routers the bi-sectional bandwidth amount to 1,280 Gbit/s).
From a datacenter view, the network starts at the rack level, where19-inch racks are custom-made and contain 40 to 80 servers (20 to 40 1U servers on either side, while new servers are 2U rackmount systems.[92] Each rack has anEthernet switch). Servers are connected via a 1 Gbit/sEthernet link to the top of rack switch (TOR). TOR switches are then connected to agigabit cluster switch using multiple gigabit or ten gigabit uplinks.[93] The cluster switches themselves are interconnected and form the datacenter interconnect fabric (most likely using a dragonfly design rather than a classic butterfly or flattened butterfly layout[94]).
From an operation standpoint, when a client computer attempts to connect to Google, severalDNS servers resolvewww.google.com into multiple IP addresses viaRound Robin policy. Furthermore, this acts as the first level ofload balancing and directs the client to different Google clusters. A Google cluster has thousands ofservers, and once the client has connected to the server additional load balancing is done to send the queries to the least loaded web server. This makes Google one of the largest and most complexcontent delivery networks.[95]
To supportfault tolerance, increase the scale of data centers and accommodate low-radix switches, Google has adopted various modifiedClos topologies in the past.[98]
In February 2009,Stora Enso announced that they had sold the Summa paper mill inHamina,Finland to Google for 40 million Euros.[102][103] Google invested 200 million euros on the site to build a data center and announced additional 150 million euro investment in 2012.[104][105] Google chose this location due to the availability and proximity of renewable energy sources.[106]
In 2013, the press revealed the existence of Google's floating data centers along the coasts of the states of California (Treasure Island's Building 3) and Maine. The development project was maintained under tight secrecy. The data centers are 250 feet long, 72 feet wide, 16 feet deep. The patent for an in-ocean data center cooling technology was bought by Google in 2009[107][108] (along with a wave-powered ship-based data center patent in 2008[109][110]). Shortly thereafter, Google declared that the two massive and secretly built infrastructures were merely "interactive learning centers, [...] a space where people can learn about new technology."[111]
Google halted work on the barges in late 2013 and began selling off the barges in 2014.[112][113]
Most of thesoftware stack that Google uses on their servers was developed in-house.[114] According to a well-known former Google employee in 2006,C++,Java,Python and (more recently)Go are favored over other programming languages.[115] For example, the back end of Gmail is written in Java and the back end of Google Search is written in C++.[116] Google has acknowledged that Python has played an important role from the beginning, and that it continues to do so as the system grows and evolves.[117]
The software that runs the Google infrastructure includes:[118]
Google Web Server (GWS) – custom Linux-based Web server that Google uses for its online services.
Google has developed several abstractions which it uses for storing most of its data:[126]
Protocol Buffers – "Google's lingua franca for data",[127] a binary serialization format which is widely used within the company.
SSTable (Sorted Strings Table) – a persistent, ordered, immutable map from keys to values, where both keys and values are arbitrary byte strings. It is also used as one of the building blocks of Bigtable.[128]
RecordIO – a sequence of variable sized records.[126][129][130]
Most operations are read-only. When an update is required, queries are redirected to other servers, so as to simplify consistency issues. Queries are divided into sub-queries, where those sub-queries may be sent to different ducts inparallel, thus reducing the latency time.[92]
To lessen the effects of unavoidablehardware failure, software is designed to befault tolerant. Thus, when a system goes down, data is still available on other servers, which increases reliability.
Like most search engines, Google indexes documents by building a data structure known asinverted index. Such an index obtains a list of documents by a query word. The index is very large due to the number of documents stored in the servers.[95]
The index is partitioned by document IDs into many pieces calledshards. Each shard isreplicated onto multiple servers. Initially, the index was being served fromhard disk drives, as is done in traditionalinformation retrieval (IR) systems. Google dealt with the increasing query volume by increasing number of replicas of each shard and thus increasing number of servers. Soon they found that they had enough servers to keep a copy of the whole index in main memory (although with low replication or no replication at all), and in early 2001 Google switched to anin-memory index system. This switch "radically changed many design parameters" of their search system, and allowed for a significant increase in throughput and a large decrease in latency of queries.[131]
In June 2010, Google rolled out a next-generation indexing and serving system called "Caffeine" which can continuously crawl and update the search index. Previously, Google updated its search index in batches using a series ofMapReduce jobs. The index was separated into several layers, some of which were updated faster than the others, and the main layer wouldn't be updated for as long as two weeks. With Caffeine, the entire index is updated incrementally on a continuous basis. Later Google revealed a distributed data processing system called "Percolator"[132] which is said to be the basis of Caffeine indexing system.[124][133]
Google's server infrastructure is divided into several types, each assigned to a different purpose:[92][95][134][135][136]
Web servers coordinate the execution of queries sent by users, then format the result into anHTML page. The execution consists of sending queries to index servers, merging the results, computing their rank, retrieving a summary for each hit (using the document server), asking for suggestions from the spelling servers, and finally getting a list of advertisements from the ad server.
Data-gathering servers are permanently dedicated tospidering the Web. Google's web crawler is known as GoogleBot. They update the index and document databases and apply Google's algorithms to assign ranks to pages.
Each index server contains a set of index shards. They return a list of document IDs ("docid"), such that documents corresponding to a certain docid contain the query word. These servers need less disk space, but suffer the greatest CPU workload.
Document servers store documents. Each document is stored on dozens of document servers. When performing a search, a document server returns a summary for the document based on query words. They can also fetch the complete document when asked. These servers need more disk space.
Ad servers manage advertisements offered by services likeAdWords andAdSense.
Spelling servers make suggestions about the spelling of queries.
There are also "canary requests", whereby a request is first sent to one or two leaf servers to see if the response time is reasonable. If not, then the request fails. This provides security.[137]
In October 2013,The Washington Post reported that the U.S.National Security Agency intercepted communications between Google's data centers, as part of a program namedMUSCULAR.[138][139] This wiretapping was made possible because, at the time, Google did not encrypt data passed inside its own network.[140] This was rectified when Google began encrypting data sent between data centers in 2013.[141]
Some of Google's most efficient data centers in 2012 ran at 35 °C (95 °F) using only fresh air cooling, requiring no electrically powered air conditioning.[142][needs update]
In December 2016, Google announced that—starting in 2017—it would purchase enough renewable energy to match 100% of the energy usage of its data centers and offices. The commitment will make Google "the world's largest corporate buyer of renewable power, with commitments reaching 2.6 gigawatts (2,600 megawatts) of wind and solar energy".[143][144][145]
In 2025, Google agreed to pay to restart the 600 MWDuane Arnold nuclear power station in Iowa by 2029.[146]
^Jason Hidalgo (September 16, 2020)."Google to invest $600 million in data center near Reno, gets tax break".Reno Gazette Journal. RetrievedOctober 26, 2020.With our new data center in Storey County and our expanded investment in our Henderson site, Google will have two facilities in Nevada, bringing our total investment to over $1.88 billion.
^Tawfik Jelassi; Albrecht Enders (2004). "Case study 16 — Google".Strategies for E-business. Pearson Education. p. 424.ISBN978-0-273-68840-2.
^abComputer Architecture, Fifth Edition: A Quantitative Approach,ISBN978-0123838728; Chapter Six; 6.7 "A Google Warehouse-Scale Computer"page 471 "Designing motherboards that only need a single 12-volt supply so that the UPS function could be supplied by standard batteries associated with each server"