Questions tagged [bigtable]

Bigtable is a distributed storage system (built by Google) for managing structured data that is designed to scale to a very large size: petabytes of data across thousands of commodity servers.

Bigtable

A Distributed Storage System for Structured Data

Bigtable is a distributed storage system (built by Google) for managing structured data that is designed to scale to a very large size: petabytes of data across thousands of commodity servers.

Many projects at Google store data in Bigtable, including web indexing, Google Earth, and Google Finance. These applications place very different demands on Bigtable, both in terms of data size (from URLs to web pages to satellite imagery) and latency requirements (from backend bulk processing to real-time data serving).

Despite these varied demands, Bigtable has successfully provided a flexible, high-performance solution for all of these Google products.

Some features

  • fast and extremely large-scale DBMS
  • a sparse, distributed multi-dimensional sorted map, sharing characteristics of both row-oriented and column-oriented databases.
  • designed to scale into the petabyte range
  • it works across hundreds or thousands of machines
  • it is easy to add more machines to the system and automatically start taking advantage of those resources without any reconfiguration
  • each table has multiple dimensions (one of which is a field for time, allowing versioning)
  • tables are optimized for GFS (Google File System) by being split into multiple tablets - segments of the table as split along a row chosen such that the tablet will be ~200 megabytes in size.

Architecture

BigTable is not a relational database. It does not support joins nor does it support rich SQL-like queries. Each table is a multidimensional sparse map. Tables consist of rows and columns, and each cell has a time stamp. There can be multiple versions of a cell with different time stamps. The time stamp allows for operations such as "select 'n' versions of this Web page" or "delete cells that are older than a specific date/time."

In order to manage the huge tables, Bigtable splits tables at row boundaries and saves them as tablets. A tablet is around 200 MB, and each machine saves about 100 tablets. This setup allows tablets from a single table to be spread among many servers. It also allows for fine-grained load balancing. If one table is receiving many queries, it can shed other tablets or move the busy table to another machine that is not so busy. Also, if a machine goes down, a tablet may be spread across many other servers so that the performance impact on any given machine is minimal.

Tables are stored as immutable SSTables and a tail of logs (one log per machine). When a machine runs out of system memory, it compresses some tablets using Google proprietary compression techniques (BMDiff and Zippy). Minor compactions involve only a few tablets, while major compactions involve the whole table system and recover hard-disk space.

The locations of Bigtable tablets are stored in cells. The lookup of any particular tablet is handled by a three-tiered system. The clients get a point to a META0 table, of which there is only one. The META0 table keeps track of many META1 tablets that contain the locations of the tablets being looked up. Both META0 and META1 make heavy use of pre-fetching and caching to minimize bottlenecks in the system.

Implementation

BigTable is built on Google File System (GFS), which is used as a backing store for log and data files. GFS provides reliable storage for SSTables, a Google-proprietary file format used to persist table data.

Another service that BigTable makes heavy use of is Chubby, a highly-available, reliable distributed lock service. Chubby allows clients to take a lock, possibly associating it with some metadata, which it can renew by sending keep alive messages back to Chubby. The locks are stored in a filesystem-like hierarchical naming structure.

There are three primary server types of interest in the Bigtable system:

  1. Master servers: assign tablets to tablet servers, keeps track of where tablets are located and redistributes tasks as needed.
  2. Tablet servers: handle read/write requests for tablets and split tablets when they exceed size limits (usually 100MB - 200MB). If a tablet server fails, then a 100 tablet servers each pickup 1 new tablet and the system recovers.
  3. Lock servers: instances of the Chubby distributed lock service. Lots of actions within BigTable require acquisition of locks including opening tablets for writing, ensuring that there is no more than one active Master at a time, and access control checking.

API

Typical operations to BigTable are creation and deletion of tables and column families, writing data and deleting columns from a row. BigTable provides this functions to application developers in an API. Transactions are supported at the row level, but not across several row keys.

References

Related Tags

528 questions
16
votes
5 answers

Pro's of databases like BigTable, SimpleDB

New school datastore paradigms like Google BigTable and Amazon SimpleDB are specifically designed for scalability, among other things. Basically, disallowing joins and denormalization are the ways this is being accomplished. In this topic, however,…
Rik
  • 28,507
  • 14
  • 48
  • 67
14
votes
2 answers

Bigtable Practical Example

Can someone provide a real-world example of how data would be structured within a Bigtable? Please talk from a search engine, social networking or any other familiar point of view which illustrates clearly and pragmatically how the row -> column…
S. Valmont
  • 941
  • 2
  • 11
  • 25
14
votes
9 answers

What's your approach for optimizing large tables (+1M rows) on SQL Server?

I'm importing Brazilian stock market data to a SQL Server database. Right now I have a table with price information from three kind of assets: stocks, options and forwards. I'm still in 2006 data and the table has over half million records. I have…
Edwin Jarvis
  • 5,980
  • 6
  • 36
  • 41
14
votes
2 answers

Tree structures in a nosql database

I'm developing an application for Google App Engine which uses BigTable for its datastore. It's an application about writing a story collaboratively. It's a very simple hobby project that I'm working on just for fun. It's open source and you can see…
Blixt
  • 49,547
  • 13
  • 120
  • 153
13
votes
2 answers

what exactly is a map dimension in a multi-dimensional map?

Like many these days, I am an old relational-model user approaching Cassandra for the first time. I have been trying to understand Cassandra's data model, and when I read about it I frequently encounter statements that encourage me to think about…
pohl
  • 3,158
  • 1
  • 30
  • 48
13
votes
3 answers

Denormalization in Google App Engine?

Background:::: I'm working with google app engine (GAE) for Java. I'm struggling to design a data model that plays to big table's strengths and weaknesses, these are two previous related posts: Database design - google app engine Appointments and…
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
12
votes
2 answers

What it the difference between Hbase and BigTable?

Can anyone tell me what is the difference between Apache HBase database and Bigtable? Or are they same? Which one supports relations, if any? If they are Big Searcher what is the difference?
salar
  • 137
  • 1
  • 2
  • 11
11
votes
3 answers

Google Cloud Bigtable backup and recovery

I am new to Google Cloud Bigtable and have a very basic question as to whether the cloud offering protects my data against user error or application corruption? I see a lot of mention on the Google website that the data is safe and protected but…
JStorage
  • 229
  • 2
  • 10
10
votes
8 answers

30 million records a day, SQL Server can't keep up, other kind of database system needed?

Some time ago I thought an new statistics system over, for our multi-million user website, to log and report user-actions for our customers. The database-design is quite simple, containing one table, with a foreignId (200,000 different id's), a…
Jan Jongboom
  • 26,598
  • 9
  • 83
  • 120
9
votes
2 answers

parent->child relationships in appengine python (bigtable)

I'm still learning my lessons about data modeling in bigtable/nosql and would appreciate some feedback. Would it be fair to say that I should avoid parent->child relationships in my data modeling if I frequently need to deal with the children in…
Bob Ralian
  • 1,949
  • 1
  • 20
  • 29
9
votes
3 answers

Querying for a value existing in a model's list property in AppEngine

A sample model: class Foo(db.Model): id = db.IntegerProperty() bar = db.ListProperty(int, required=True) How can I query using either Query or GqlQuery to return all Foo entities that have a given value in their bar property? If I have…
mshafrir
  • 5,190
  • 12
  • 43
  • 56
9
votes
4 answers

Database that consumes less disk space

I'm looking at solutions to store a massive quantity of information consuming the less possible disk space. The information structure is very simple and the queries will also be very simple. I've looked at solutions like Apache Cassandra and…
Hugo Palma
  • 3,376
  • 3
  • 21
  • 22
8
votes
3 answers

GQL query for

When you change data models on the app engine to add new properties those entries without a certain property are listed with the value in the online data viewer. What I'm wondering is how can I write a query to find those entries?
Swizec Teller
  • 2,322
  • 1
  • 19
  • 24
8
votes
4 answers

Bigtable database design theory

I am very well versed in the theory and practice of relational database design. I know what works and what doesn't, what is performant and what is maintainable (almost - there's always place to tweak when you start having real data). It seems I…
flybywire
  • 261,858
  • 191
  • 397
  • 503
7
votes
2 answers

How to set TTL on Hbase Row and Bigtable Row

I am trying to evaluate if it is possible to set a TTL on individual row in HBase or Bigtable. I know that Cassandra allows using TTL at insert. I want to find if the same is possible in HBase and in Google Cloud Bigtable. INSERT INTO test (k,v)…
1
2
3
35 36