Bigtable: A Distributed Storage System for Structured Data : part8 Real Applications

8 Real Applications

As of August 2006, there are 388 non-test Bigtable clusters running in various Google machine clusters, with a combined total of about 24,500 tablet servers. 


Table 1 shows a rough distribution of tablet servers per cluster.


Many of these clusters are used for development purposes and therefore are idle for significant periods. 
One group of 14 busy clusters with 8069 total tablet servers saw an aggregate volume of more than 1.2 million requests per second, with incoming RPC traffic of about 741 MB/s and outgoing RPC traffic of about 16 GB/s.


Table 2 provides some data about a few of the tables currently in use. 


Some tables store data that is served to users, whereas others store data for batch processing;
the tables range widely in total size, average cell size, percentage of data served from memory, and complexity of the table schema. 
In the rest of this section, we briefly describe how three product teams use Bigtable.

8實際應用
截至2006年8月,共有388個未測試的BigTable集羣在各種Google機器集羣中運行,共計約24,500個 tablet 服務器。
表1顯示了每個羣集的 tablet 服務器的粗略分佈。
這些集羣中的許多都被用於開發目的,因此在很長時間內閒置。
一組14個繁忙的集羣,總共有8069個 tablet 服務器,每秒總共需要超過120萬個請求,傳入的RPC流量約爲741 MB/s,出貨RPC流量約爲16 GB/s。
表2提供了有關當前使用的幾個表的一些數據。
一些表存儲爲用戶提供的數據,而其他表存儲用於批處理的數據;
這些表的範圍廣泛在總大小,平均單元大小,從內存服務的數據的百分比以及表模式的複雜性。
在本節的其餘部分,我們簡要介紹三個產品團隊如何使用BigTable。


8.1 Google Analytics
Google Analytics (analytics.google.com) is a service that helps webmasters analyze traffic patterns at their web sites. 
It provides aggregate statistics, such as the number of unique visitors per day and the page views per URL per day, as well as site-tracking reports, such as the percentage of users that made a purchase, given that they earlier viewed a specific page.
To enable the service, webmasters embed a small JavaScript program in their web pages. 
This program is invoked whenever a page is visited. 
It records various information about the request in Google Analytics, such as a user identifier and information about the page being fetched. 
Google Analytics summarizes this data and makes it available to webmasters.
We briefly describe two of the tables used by Google Analytics. 
The raw click table ( ̃200 TB) maintains a row for each end-user session. 
The row name is a tuple containing the website’s name and the time at which the session was created. 
This schema ensures that sessions that visit the same web site are contiguous, and that they are sorted chronologically. 
This table compresses to 14% of its original size.
The summary table ( ̃20 TB) contains various predefined summaries for each website. 
This table is generated from the raw click table by periodically scheduled MapReduce jobs. 
Each MapReduce job extracts recent session data from the raw click table. 
The overall system’s throughput is limited by the throughput of GFS.
This table compresses to 29% of its original size.

8.1 Google Analytics(分析)
Google Analytics(分析)是一種可幫助網站管理員分析其網站流量模式的服務。
它提供彙總統計信息,例如每天的唯一身份訪問者數量和每個網址每天的網頁瀏覽量,以及網站跟蹤報告(例如,進行購買的用戶的百分比),因爲他們早先查看了特定網頁。
要啓用該服務,網站管理員會在其網頁中嵌入一個小型JavaScript程序。
每當訪問頁面時調用此程序。
它記錄有關Google Analytics(分析)中的請求的各種信息,例如用戶標識符和有關正在獲取的頁面的信息。
Google Analytics(分析)總結了這些數據,並將其提供給網站管理員。
我們簡要介紹了Google Analytics(分析)使用的兩個表格。
原始點擊表(200 TB)爲每個最終用戶會話維護一行。
行名稱是一個包含網站名稱和創建會話時間的元組。
此模式確保訪問同一網站的會話是連續的,並且它們按時間順序排序。
該表壓縮到其原始尺寸的14%。
彙總表(20 TB)包含各個網站的各種預定義摘要。
此表是通過定期安排的MapReduce作業從原始點擊表生成的。
每個MapReduce作業從原始點擊表中提取最近的會話數據。
整個系統的吞吐量受到GFS吞吐量的限制。
該表壓縮到其原始尺寸的29%。

8.2 Google Earth
Google operates a collection of services that provide users with access to high-resolution satellite imagery of the world’s surface, both through the web-based Google Maps interface (maps.google.com) and through the Google Earth (earth.google.com) custom client software. 
These products allow users to navigate across the world’s surface: they can pan, view, and annotate satellite imagery at many different levels of resolution. 
This system uses one table to preprocess data, and a different set of tables for serving client data.
The preprocessing pipeline uses one table to store raw imagery. 
During preprocessing, the imagery is cleaned and consolidated into final serving data. 
This table contains approximately 70 terabytes of data and therefore is served from disk. 
The images are efficiently compressed already, so Bigtable compression is disabled.
Table 2: Characteristics of a few tables in production use. 
Table size (measured before compression) and # Cells indicate approximate sizes. 
Compression ratio is not given for tables that have compression disabled.
Each row in the imagery table corresponds to a single geographic segment. 
Rows are named to ensure that adjacent geographic segments are stored near each other.
The table contains a column family to keep track of the sources of data for each segment. 
This column family has a large number of columns: essentially one for each raw data image. 
Since each segment is only built from a few images, this column family is very sparse.
The preprocessing pipeline relies heavily on MapReduce over Bigtable to transform data. 
The overall system processes over 1 MB/sec of data per tablet server during some of these MapReduce jobs.
The serving system uses one table to index data stored in GFS. 
This table is relatively small ( ̃500 GB), but it must serve tens of thousands of queries per second per datacenter with low latency. 
As a result, this table is hosted across hundreds of tablet servers and contains in-memory column families.

8.2 Google地球
Google通過基於網絡的Google地圖界面(maps.google.com)和Google地球(earth.google.com),爲用戶提供了世界各地高分辨率衛星圖像的服務,定製客戶端軟件。
這些產品允許用戶瀏覽世界各地的表面:他們可以以許多不同的分辨率平移,查看和註釋衛星圖像。
該系統使用一個表來預處理數據,以及一組用於提供客戶端數據的不同表。
預處理管道使用一個表來存儲原始圖像。
在預處理期間,圖像被清理並整合成最終的投放數據。
該表包含大約70 TB的數據,因此從磁盤提供。
圖像已被有效地壓縮,因此禁用Bigtable壓縮。
表2:生產使用中幾張表的特徵。
表尺寸(壓縮前測量)和#單元格表示近似尺寸。
沒有給壓縮比壓縮禁用的表。
圖像表中的每一行對應於單個地理區域。
命名行以確保相鄰的地理區段彼此靠近存儲。
該表包含一個列系列,用於跟蹤每個段的數據源。
此列系列具有大量列:對於每個原始數據圖像,基本上爲一列。
由於每個段僅由幾個圖像構建,所以該列族是非常稀疏的。
預處理流水線嚴重依賴於BigTable中的MapReduce來轉換數據。
在某些MapReduce作業期間,整個系統處理每個 tablet 服務器超過1 MB/秒的數據。
服務系統使用一個表來索引存儲在GFS中的數據。
此表格相對較小(500 GB),但每個數據中心每秒可能需要數萬次查詢,具有低延遲。
因此,該表託管在數百個 tablet 服務器上,幷包含內存中的列系列。

8.3 Personalized Search
Personalized Search (www.google.com/psearch) is an opt-in service that records user queries and clicks across a variety of Google properties such as web search, images, and news. 
Users can browse their search histories to revisit their old queries and clicks, and they can ask for personalized search results based on their historical Google usage patterns.
Personalized Search stores each user’s data in Bigtable. 
Each user has a unique userid and is assigned a row named by that userid. 
All user actions are stored in a table. 
A separate column family is reserved for each type of action (for example, there is a column family that stores all web queries). 
Each data element uses as its Bigtable timestamp the time at which the corresponding user action occurred. 
Personalized Search generates user profiles using a MapReduce over Bigtable. 
These user profiles are used to personalize live search results.
The Personalized Search data is replicated across several Bigtable clusters to increase availability and to reduce latency due to distance from clients. 
The Personalized Search team originally built a client-side replication mechanism on top of Bigtable that ensured eventual consistency of all replicas. 
The current system now uses a replication subsystem that is built into the servers.
The design of the Personalized Search storage system allows other groups to add new per-user information in their own columns, and the system is now used by many other Google properties that need to store per-user configuration options and settings. 
Sharing a table amongst many groups resulted in an unusually large number of column families. 
To help support sharing, we added a simple quota mechanism to Bigtable to limit the storage consumption by any particular client in shared tables; this mechanism provides some isolation between the various product groups using this system for per-user information storage.

8.3個性化搜索
個性化搜索(www.google.com/psearch)是一種選擇性服務,用於記錄用戶查詢和點擊各種Google資源(如網絡搜索,圖像和新聞)。
用戶可以瀏覽他們的搜索歷史記錄來重新訪問他們的舊查詢和點擊次數,他們可以根據Google的歷史使用模式要求個性化搜索結果。
個性化搜索將每個用戶的數據存儲在Bigtable中。
每個用戶都有一個唯一的用戶標識,並分配一個由該用戶標識的行。
所有用戶操作都存儲在表中。
爲每種類型的操作保留單獨的列系列(例如,存在所有Web查詢的列系列)。
每個數據元素使用相應用戶操作發生的時間作爲其Bigtable時間戳。
個性化搜索使用MapReduce通過BigTable生成用戶配置文件。
這些用戶配置文件用於個性化實時搜索結果。
個性化搜索數據在多個Bigtable集羣中複製,以增加可用性並減少由於與客戶端的距離而造成的延遲。
個性化搜索團隊最初在Bigtable之上構建了一個客戶端複製機制,確保所有副本的最終一致性。
當前系統現在使用內置在服務器中的複製子系統。
個性化搜索存儲系統的設計允許其他組在其自己的列中添加新的每用戶信息,並且系統現在被許多其他Google屬性使用,需要存儲每個用戶的配置選項和設置。
在許多團體之間分享一張桌子導致了非常多的列家庭。
爲了幫助支持共享,我們在Bigtable中添加了一個簡單的配額機制來限制共享表中任何特定客戶端的存儲消耗;
這種機制爲使用該系統的各個用戶信息存儲的各種產品組之間提供了一些隔離。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章