Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Clean up docs. (vitessio#2079)
Browse files Browse the repository at this point in the history
Quick pass over docs reachable from vitess.io to remove or update anything that was obviously outdated.
  • Loading branch information
enisoc authored Sep 23, 2016
1 parent 9c29175 commit 70c2eb8
Show file tree
Hide file tree
Showing 12 changed files with 154 additions and 124 deletions.
51 changes: 12 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,31 @@

# Vitess

Vitess is a storage platform for scaling MySQL.
It is optimized to run as effectively in cloud architectures as it does on dedicated hardware.
It combines many important features of MySQL with the scalability of a NoSQL database.
Vitess is a database clustering system for horizontal scaling of MySQL
through generalized sharding.

It's been actively developed since 2011, and is currently used as
a fundamental component of YouTube's MySQL infrastructure, serving thousands of
QPS per server. If you want to find out whether Vitess is a good fit for your
project, please visit [vitess.io](http://vitess.io).
By encapsulating shard-routing logic, Vitess allows application code and
database queries to remain agnostic to the distribution of data onto
multiple shards. With Vitess, you can even split and merge shards as your needs
grow, with an atomic cutover step that takes only a few seconds.

There are a couple of videos from [sougou](https://github.com/sougou) that you can watch:
a [short intro](http://youtu.be/midJ6b1LkA0) prepared for Google I/O 2014
and a more [detailed presentation from @Scale '14](http://youtu.be/5yDO-tmIoXY).
Vitess has been a core component of YouTube's database infrastructure
since 2011, and has grown to encompass tens of thousands of MySQL nodes.

## Documentation

### Intro

* [Helicopter overview](http://vitess.io):
high level overview of Vitess that should tell you whether Vitess is for you.
* [Sharding in Vitess](http://vitess.io/user-guide/sharding.html)

### Using Vitess

* Getting Started
* [On Kubernetes](http://vitess.io/getting-started/).
* [From the ground up](http://vitess.io/getting-started/local-instance.html).
* [Architecture](http://vitess.io/overview/#architecture):
all Vitess tools and servers.
* [Reparenting](http://vitess.io/doc/Reparenting):
performing master failover.
* [Resharding](http://vitess.io/user-guide/sharding.html#resharding):
adding more shards to your cluster.
* [Schema management](http://vitess.io/doc/SchemaManagement):
managing your database schema using Vitess.

### Reference

* [General Concepts](http://vitess.io/overview/concepts.html)
* [Topology Service](http://vitess.io/doc/TopologyService)
* [VTGate V3](http://vitess.io/doc/VTGateV3Features/)
For more about Vitess, please visit [vitess.io](http://vitess.io).

## Contact

Ask questions in the
[vitess@googlegroups.com](https://groups.google.com/forum/#!forum/vitess)
discussion forum.
discussion forum or on [Gitter](https://gitter.im/youtube/vitess).

Subscribe to
[vitess-announce@googlegroups.com](https://groups.google.com/forum/#!forum/vitess-announce)
or the [Vitess Blog](http://blog.vitess.io/)
for low-frequency updates like new features and releases.

## License

Unless otherwise noted, the vitess source files are distributed
Unless otherwise noted, the Vitess source files are distributed
under the BSD-style license found in the LICENSE file.
34 changes: 21 additions & 13 deletions doc/BackupAndRestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ Vitess. Vitess uses backups for two purposes:

## Prerequisites

Vitess stores data backups on a Backup Storage service. Currently,
Vitess supports backups to either [Google Cloud Storage](https://cloud.google.com/storage/)
or any network-mounted drive (such as NFS). The core Vitess software's
[BackupStorage interface](https://github.com/youtube/vitess/blob/master/go/vt/mysqlctl/backupstorage/interface.go)
defines methods for creating, listing, and removing backups. Plugins for other
storage services just need to implement the interface.
Vitess stores data backups on a Backup Storage service, which is
a [pluggable interface](https://github.com/youtube/vitess/blob/master/go/vt/mysqlctl/backupstor age/interface.go).

Currently, we have plugins for:

* A network-mounted path (e.g. NFS)
* Google Cloud Storage
* Amazon S3
* Ceph

Before you can back up or restore a tablet, you need to ensure that the
tablet is aware of the Backup Storage system that you are using. To do so,
Expand All @@ -30,24 +33,29 @@ access to the location where you are storing backups.
<td>Specifies the implementation of the Backup Storage interface to use.<br><br>
Current plugin options available are:
<ul>
<li><code>gcs</code>: For Google Cloud Storage.</li>
<li><code>ceph</code>: For Ceph Object Gateway S3 API.</li>
<li><code>file</code>: For NFS or any other filesystem-mounted network drive.</li>
<li><code>file</code>: NFS or any other filesystem-mounted network drive.</li>
<li><code>gcs</code>: Google Cloud Storage.</li>
<li><code>s3</code>: Amazon S3.</li>
<li><code>ceph</code>: Ceph Object Gateway S3 API.</li>
</ul>
</td>
</tr>
<tr>
<td><nobr><code>-file_backup_storage_root</code></nobr></td>
<td>For the <code>file</code> plugin, this identifies the root directory for backups.</td>
</tr>
<tr>
<td><nobr><code>-gcs_backup_storage_project</code></nobr></td>
<td>For the <code>gcs</code> plugin, this identifies the <a href="https://cloud.google.com/storage/docs/projects">project</a> to use.</td>
</tr>
<tr>
<td><nobr><code>-gcs_backup_storage_bucket</code></nobr></td>
<td>For the <code>gcs</code> plugin, this identifies the <a href="https://cloud.google.com/storage/docs/concepts-techniques#concepts">bucket</a> to use.</td>
</tr>
<tr>
<td><nobr><code>-s3_backup_aws_region</code></nobr></td>
<td>For the <code>s3</code> plugin, this identifies the AWS region.</td>
</tr>
<tr>
<td><nobr><code>-s3_backup_storage_bucket</code></nobr></td>
<td>For the <code>s3</code> plugin, this identifies the AWS S3 bucket.</td>
</tr>
<tr>
<td><nobr><code>-ceph_backup_storage_config</code></nobr></td>
<td>For the <code>ceph</code> plugin, this identifies the path to a text file with a JSON object as configuration. The JSON object requires the following keys: <code>accessKey</code>, <code>secretKey</code>, <code>endPoint</code> and <code>useSSL</code>. Bucket name is computed from keyspace name and is separate for different keyspaces.</td>
Expand Down
11 changes: 4 additions & 7 deletions doc/ClientLibraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,11 @@ Vitess client libraries follow these core principles:
* Each client library should support language-specific, idiomatic
constructs to simplify application development in that language.
* Client libraries should integrate with the following language-specific
database drivers, though this support is not yet provided in some cases:
* Go: [database/sql package](http://golang.org/pkg/database/sql/) (done)
database drivers. For example, current languages implement the following:
* Go: [database/sql package](http://golang.org/pkg/database/sql/)
* Java: [JDBC](https://docs.oracle.com/javase/tutorial/jdbc/index.html)
compliance (in progress)
* PHP: [PHP Data Objects \(PDO\)](http://php.net/manual/en/intro.pdo.php)
compliance (in progress)
* Python: [DB API](https://www.python.org/dev/peps/pep-0249/) compliance
(done)
* Python: [PEP 0249 DB API](https://www.python.org/dev/peps/pep-0249/)
* Libraries provide a thin wrapper around the proto3 service definitions.
Those wrappers could be extended with adapters to higher level libraries
like SQLAlchemy (Python) or JDBC (Java), with other object-based helper
Expand Down Expand Up @@ -86,7 +83,7 @@ Alternatively, you can set the
[command line flag "vtgate_protocol"](https://github.com/youtube/vitess/blob/ff800b2a1801f0bb8b0c29a701d9c0988bf827e2/go/vt/vtgate/vtgateconn/vtgateconn.go#L27)
to "grpc".

The Go client interface has multiple Execute* methods for different use-cases
The Go client interface has multiple `Execute*()` methods for different use-cases
and sharding configurations. When you start off with an unsharded database, we
recommend to use the
[ExecuteShards method](https://godoc.org/github.com/youtube/vitess/go/vt/vtgate/vtgateconn#VTGateConn.ExecuteShards)
Expand Down
8 changes: 2 additions & 6 deletions doc/Reparenting.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ replicate from that master.

## MySQL requirements

Vitess supports [MySQL 5.6](https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html), [MySQL 5.7](https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-howto.html) and [MariaDB](https://mariadb.com/kb/en/mariadb/global-transaction-id/) implementations.
Vitess supports [MySQL 5.6](https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html), [MySQL 5.7](https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-howto.html) and [MariaDB 10.0](https://mariadb.com/kb/en/mariadb/global-transaction-id/) implementations.

### GTIDs
Vitess requires the use of global transaction identifiers
Expand Down Expand Up @@ -176,11 +176,7 @@ by starting <code>vtctld</code> with the
<code>--disable\_active\_reparents</code> flag set to <code>true</code>.
(You cannot set the flag after <code>vtctld</code> is started.)

## Reparenting And Serving Graph

During the reparenting process, Vitess shuffles servers such that servers
might be demoted, or promoted. The **serving graph** should
reflect the latest state of the service.
## Fixing Replication

A tablet can be orphaned after a reparenting if it is unavailable
when the reparent operation is running but then recovers later on.
Expand Down
30 changes: 0 additions & 30 deletions doc/Sharding.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,36 +58,6 @@ a single shard in the application's "user" keyspace. On the other hand,
a query that retrieves information about several products might be
directed to one or more shards in the application's "product" keyspace.

### Sharding Keys

As discussed above, Vitess calculates the sharding keys associated
with any particular query and then routes the query to the appropriate
shards.

Vitess supports two types of sharding keys:

* **Binary data:** The key is an array of bytes. Vitess uses regular
byte-array comparison to determine which shard should handle the
query. The MySQL representation for this type of sharding key is
a <code>VARBINARY</code> field.

* **64-bit unsigned integer:** Vitess converts the 64-bit integer into
a byte array by copying the bytes, most significant byte first,
into 8 bytes. Vitess then uses byte-array comparison to identify the
right shards to handle the query. The MySQL representation for this
type of sharding key is a <code>bigint(20) UNSIGNED</code> field.

A sharded keyspace contains information about the type of sharding key
that the keyspace uses. Each database table in the shard has a column
that stores the sharding key associated with each row in the table. The
sharding key column in each table has the same name and column type.

A common example of a sharding key is the 64-bit hash of a user ID. The
hashing function ensures that the sharding keys are evenly distributed
in the space.

**Note:** If the vtgate v3 API is used, the sharding key value is no longer materialized. Instead, vtgate can calculate it on the fly when reading and inserting data. (A valid VSchema is required to tell vtgate how to calculate the sharding key value.)

### Key Ranges and Partitions

Vitess uses key ranges to determine which shards should handle any
Expand Down
35 changes: 12 additions & 23 deletions doc/UserGuideIntroduction.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
## Platform support

Vitess runs on either Ubuntu 14.04 (Trusty) or Debian 7.0 (Wheezy).
You can run Vitess on local hardware or as the storage engine in a
Kubernetes cluster.
We continuously test against Ubuntu 14.04 (Trusty) and Debian 8 (Jessie).
Other Linux distributions should work as well.

## Database support

Vitess supports [MySQL 5.6](http://dev.mysql.com/doc/refman/5.6/en/)
and [MariaDB 10.0](https://downloads.mariadb.org/mariadb/10.0.21/)
implementations.

**Note:** If you are using MariaDB, you must install version 10.0 or
higher. If you are using an <code>apt</code> repository, confirm that
it offers an option to install that version. You can also download the
source directly from
[mariadb.org](https://downloads.mariadb.org/mariadb/10.0.21/).
Vitess supports [MySQL 5.6](http://dev.mysql.com/doc/refman/5.6/en/),
[MySQL 5.7](http://dev.mysql.com/doc/refman/5.7/en/),
and [MariaDB 10.0](https://downloads.mariadb.org/mariadb/10.0.21/).

### Data types and SQL support

In Vitess, database tables are like MySQL relational tables, and you
can use relational modeling schemes (normalization) to structure your
schema. Vitess supports both primary and secondary indexes.

Vitess supports all MySQL data types, which translate into almost all
usual scalar data types. It also provides full SQL support within a
Vitess supports almost all MySQL scalar data types.
It also provides full SQL support within a
[shard](/overview/concepts.html#shard), including JOIN statements.

The maximum size/value is 16MB per cell/row. In addition, the limit
on the total database size is in the tens of TB.

Vitess does not currently support encoded protobufs or protocol buffer
querying. (The latter is also known as cracking.) Protocol buffers can
be stored as a blob in MySQL, but must be decoded and interpreted at
Expand Down Expand Up @@ -81,16 +71,15 @@ client libraries and other clients that Vitess supports.

| Type | Options |
| :-------- | :--------- |
| Client library | [gRPC](http://www.grpc.io/)<br class="bigbreak">C++<br class="bigbreak">Go<br class="bigbreak">Java<br class="bigbreak">Python |
| Client library | [gRPC](http://www.grpc.io/)<br class="bigbreak">Go<br class="bigbreak">Java<br class="bigbreak">Python<br class="bigbreak">PHP |
| MapReduce | [Hadoop input](https://hadoop.apache.org/docs/r2.7.0/api/org/apache/hadoop/mapreduce/InputFormat.html) |
| Cloud Dataflow | **_coming soon_**

## Backups

Vitess supports data backups to an NFS directory and can use any
network-mounted drive as the backup repository. Vitess defines an
interface that, in turn, defines methods for creating, listing,
and removing backups.
Vitess supports data backups to either a network mount (e.g. NFS) or to a blob store.
Backup storage is implemented through a pluggable interface,
and we currently have plugins available for Google Cloud Storage, Amazon S3,
and Ceph.

See the [Backing Up Data](/user-guide/backup-and-restore.html) section
of this guide for more information about creating and restoring data
Expand Down
12 changes: 10 additions & 2 deletions doc/VitessOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ traffic since 2011.

## Vitess on Kubernetes

Kubernetes is an open-source orchestration system for Docker containers, and Vitess is the logical storage engine choice for Kubernetes users.
[Kubernetes](http://kubernetes.io/) is an open-source orchestration system for Docker containers, and Vitess can run as a Kubernetes-aware cloud native distributed database.

Kubernetes handles scheduling onto nodes in a compute cluster, actively manages workloads on those nodes, and groups containers comprising an application for easy management and discovery. Using Kubernetes, you can easily create and manage a Vitess cluster, out of the box.
Kubernetes handles scheduling onto nodes in a compute cluster, actively manages workloads on those nodes, and groups containers comprising an application for easy management and discovery.
This provides an analogous open-source environment to the way Vitess runs in YouTube,
on the [predecessor to Kubernetes](http://blog.kubernetes.io/2015/04/borg-predecessor-to-kubernetes.html).

<div style="text-align:center">
<a class="btn btn-default btn-lg" href="/getting-started/" role="button" style="margin-bottom:16px">
<img src="/images/kubernetes.svg" style="width:30px;height:30px;margin-top:-5px">
Quickstart</a>
</div>

## Comparisons to other storage options

Expand Down
2 changes: 1 addition & 1 deletion vitess.io/_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Site wide configuration

title: Vitess
description: "Servers and tools that scale MySQL databases for the web in cloud architectures or on dedicated hardware."
description: "Vitess is a database clustering system for horizontal scaling of MySQL."
logo: vitess-logo-large-cropped-2.png
teaser: 400x250.gif
locale: en_US
Expand Down
2 changes: 1 addition & 1 deletion vitess.io/_config_dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Site wide configuration

title: Vitess
description: "Servers and tools that scale MySQL databases for the web in cloud architectures or on dedicated hardware."
description: "Vitess is a database clustering system for horizontal scaling of MySQL."
logo: vitess-logo-large-cropped-2.png
teaser: 400x250.gif
locale: en_US
Expand Down
2 changes: 1 addition & 1 deletion vitess.io/_includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
{% assign separator = '&nbsp;&nbsp;<b>·</b>&nbsp;&nbsp;' %}
<a href="https://groups.google.com/forum/#!forum/vitess" target="_blank">Contact: vitess@googlegroups.com</a>{{ separator }}
<a href="https://groups.google.com/forum/#!forum/vitess-announce" target="_blank">Announcements</a>{{ separator }}
&#169; {{ site.time | date: '%Y' }} <a href="/">Vitess</a> powered by <a href="http://www.google.com">Google Inc</a>
&#169; {{ site.time | date: '%Y' }} <a href="/">Vitess</a> powered by <a href="https://developers.google.com/open-source/">Google Inc</a>
</nav>
</footer>
7 changes: 6 additions & 1 deletion vitess.io/_layouts/home.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ layout: base
<div class="container">
<img id="home-page-logo" src="/images/{{ site.logo }}"></img>
<p class="subtitle">{{ site.description }}</p>
<p><a class="btn btn-default btn-lg" href="/overview/" role="button">Start Using {{ site.title }}</a></p>
<p>
<a class="btn btn-default btn-lg" href="/getting-started/" role="button">
<img src="/images/kubernetes.svg" style="width:30px;height:30px;margin-top:-5px"> Quickstart</a>
<a class="btn btn-default btn-lg" href="/getting-started/local-instance.html" role="button">Manual Build</a>
<a class="btn btn-default btn-lg" href="/overview/" role="button">Learn More</a>
</p>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 70c2eb8

Please sign in to comment.