Google F1
activeby Google · since 2012 · also known as F1, F1 Query
Google's internal distributed SQL database on Spanner that replaced sharded MySQL for AdWords.
Overview
F1 is a Google-internal distributed relational database built on Spanner. It replaced a manually sharded MySQL deployment for the AdWords business, which has run on it since early 2012 (over 100 TB and hundreds of thousands of requests per second at the time of the 2013 VLDB paper). It added SQL, hierarchically clustered tables, Protocol Buffer columns, change-history capture, optimistic and pessimistic transactions, and fully online asynchronous schema changes on top of Spanner's synchronous cross-datacenter replication. Its query layer grew into F1 Query, a federated SQL engine over many Google storage systems, and F1 Lightning added HTAP. F1 is not available outside Google; Cloud Spanner, which shares its SQL lineage, is the public option.
Strengths & trade-offs
Strengths
- +Showed that a globally replicated, strongly consistent SQL database can run a major revenue system
- +Fully online schema changes across thousands of servers
- +Hierarchical table interleaving keeps related rows co-located
- +Built-in change history for downstream consumers
- +F1 Query federates SQL across many storage systems
Trade-offs
- −Not available outside Google
- −Higher commit latency from synchronous cross-datacenter replication
Great for
- +Reference design for distributed SQL on a strongly consistent store
- +Studying online schema-change protocols
- +Background for choosing Spanner, CockroachDB or YugabyteDB
Think twice for
- −Anyone outside Google (it cannot be obtained)
Capabilities
Native or official first-party support · 6 of 25 tracked
Scale & consistency
- Comfortable data size
- Large · ≤ 1 PB
- Horizontal scaling
- Native
- Multi-region
- Active active
- Transactions
- Full ACID
- Consistency
- Strong
- Schema
- Strict
- Architecture
- Distributed, Multi primary
- Query languages
- SQL
Inherits Spanner's automatic sharding and synchronous replication across datacenters.
Deployment
Alternatives to Google F1
Google's globally consistent, horizontally scaling SQL service with graph, vector and full-text built in.
google-f1 vs google-cloud-spanner →Downloadable Spanner that runs on your own servers, other clouds or a laptop, with Paxos and auto-sharding.
google-f1 vs spanner-omni →Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions.
google-f1 vs cockroachdb →Apache-licensed distributed SQL that reuses the PostgreSQL query layer on a Raft-replicated storage engine.
google-f1 vs yugabytedb →MySQL-compatible distributed SQL with a row store for OLTP and a columnar replica for real-time analytics.
google-f1 vs tidb →One of the original relational databases, still sold by Actian for long-lived enterprise systems.
google-f1 vs ingres →Google F1 FAQ
What is Google F1?
Google F1 is a relational database by Google, first released in 2012. F1 is a Google-internal distributed relational database built on Spanner. It replaced a manually sharded MySQL deployment for the AdWords business, which has run on it since early 2012 (over 100 TB and hundreds of thousands of requests per second at the time of the 2013 VLDB paper). It added SQL, hierarchically clustered tables, Protocol Buffer columns, change-history capture, optimistic and pessimistic transactions, and fully online asynchronous schema changes on top of Spanner's synchronous cross-datacenter replication. Its query layer grew into F1 Query, a federated SQL engine over many Google storage systems, and F1 Lightning added HTAP. F1 is not available outside Google; Cloud Spanner, which shares its SQL lineage, is the public option.
Is Google F1 open source?
No. Google F1 is proprietary, closed-source software. License: Internal Google software (not distributed).
Does Google F1 support ACID transactions?
Yes. Google F1 supports full ACID transactions, with strong consistency.
Does Google F1 scale horizontally?
Google F1 scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at large scale (≤ 1 PB). It supports active-active multi-region writes.
What is Google F1 best for?
Google F1 is a strong fit for reference design for distributed SQL on a strongly consistent store; studying online schema-change protocols; and background for choosing Spanner, CockroachDB or YugabyteDB. Think twice for anyone outside Google (it cannot be obtained).
What are the best alternatives to Google F1?
Common alternatives to Google F1 include Google Cloud Spanner, Google Spanner Omni, CockroachDB, YugabyteDB and TiDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is Google F1?
Google F1 has little measurable public adoption today, so it ranks near the bottom of the WhichDB Score.