Skip to content

Commit

Permalink
faq: reorg advanced section, minor edits to main FAQ page
Browse files Browse the repository at this point in the history
Signed-off-by: deepthi <[email protected]>
  • Loading branch information
deepthi committed Jul 2, 2023
1 parent 5b2c7cf commit 1a26623
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 49 deletions.
16 changes: 9 additions & 7 deletions content/en/docs/faq/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,40 @@ aliases: ['/docs/user-guides/faq/']

## Where can I ask questions about Vitess?

Our most popular channel and the one we recommend for asking questions you may have is our Slack located [here](https://vitess.io/slack).
We recommend asking questions in our [Slack workspace](https://vitess.io/slack).

We have a number of other options that can be used as well listed [here](https://vitess.io/community/).
We have a number of [other options](https://vitess.io/community/) that can be used as well.

Please do note that we request that you do not ask individual project members for support. Instead please use these channels where the whole community can help you and benefit from the solutions provided. Thanks!
We request that you not ask individual project members for support. Instead, please use these public communication channels where the community can help and also benefit from the solutions provided. Thanks!

## What are the key slack channels to join?

There are many channels available and we encourage you to join as many or as few as interest you. Some of the most popular channels are listed below:

* #general
* #beginners
* #developers
* #kubernetes
* #monitoring
* #operator
* #orchestrator-integration
* #releases
* #vreplication
* #website

## How can I contribute a Pull Request to Vitess?

We always enjoy having new contributors to Vitess. Just be sure to read the information [here](https://vitess.io/docs/contributing/) to start.
We welcome new contributors to Vitess. Just be sure to read the guide [here](https://vitess.io/docs/contributing/) to start.

If you are already familiar with Vitess and you'd like information on how to file a Pull Request or submit an Issue request check out the following links:
If you are already familiar with Vitess and you would like information on how to submit a Pull Request or file an Issue check out the following links:

* [Pull Requests](https://vitess.io/docs/contributing/github-workflow/#sending-pull-requests)
* [GitHub Workflow](https://vitess.io/docs/contributing/github-workflow/)
* [Issue](https://vitess.io/docs/contributing/github-workflow/#submitting-issues)

## What are good videos to watch to get started learning about Vitess?

We have a number of [recorded presentations and videos](https://vitess.io/docs/resources/presentations/) that can be watched to start learning about Vitess.

* For a curated list please check out a PlanetScale blog post [here](https://www.planetscale.com/blog/videos-intro-to-vitess-its-powerful-capabilities-and-how-to-get-started).
* For a curated list please check out this PlanetScale [blog post](https://www.planetscale.com/blog/videos-intro-to-vitess-its-powerful-capabilities-and-how-to-get-started).

## Additional FAQs?
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Advanced Configurations
title: Advanced Configuration
description: Frequently Asked Questions about Vitess
docs_nav_disable_expand: false
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
---
title: Authentication
description: Frequently Asked Questions about Vitess
weight: 5
weight: 1
---

## How do I set up MySQL authentication in Vitess?

Vitess uses its own mechanism for managing users and their permissions through VTGate. As a result, the CREATE USER.... and GRANT... statements will not work if sent through VTGate. Instead VTGate takes care of authentication for requests, so you will need to add any users that should have access to the Keyspaces via command-line options to VTGate.

The simplest way to configure users is via a static authentication method. You can define the users in a JSON formatted file or string. Then you can load this static method into VTGate with the additional command line parameters.
The simplest way to configure users is via a static authentication method. You can define the users in a JSON formatted file or string. Then you can load this file into VTGate with the additional command line parameters.

You will be able to configure the UserData string and add multiple passwords. For password format, Vitess supports the MySQL mysql_native_password hash format and you should always specify your passwords using this in a non-test or external environment.
You will be able to configure the UserData string and add multiple passwords. For password format, Vitess supports the mysql_native_password hash format and you should always specify your passwords using this in a non-test or external environment.

To see an example of how to configure the static authentication file and more information on the various options please follow this [link](https://vitess.io/docs/user-guides/configuration-advanced/user-management/#authentication).
To see an example of how to configure the static authentication file and more information on the various options please read this [guide](https://vitess.io/docs/user-guides/configuration-advanced/user-management/#authentication).

There are other authentication mechanisms that can be utilized including LDAP-based authentication and TLS client certificate-based authentication.

## How do I configure user-level permissions in Vitess?

If you need to enforce fine-grained access control in Vitess, you cannot use the normal MySQL GRANTs system to give certain application-level MySQL users more or less permissions than others. This is because Vitess uses connection pooling with fixed MySQL users at the VTTablet level, and implements its own authentication at the VTGate level.
If you need to enforce fine-grained access control in Vitess, you cannot use the normal MySQL GRANT system to give certain application-level MySQL users more or fewer permissions than others. This is because Vitess uses connection pooling with fixed MySQL users at the VTTablet level, and implements its own authentication at the VTGate level.

Not all of the MySQL GRANT system has been implemented in Vitess. Authorization can be done via table-level ACLs. Individual users can be assigned 3 levels of permissions and can be applied on a specified set of tables, which can be enumerated or specified by regex:
Not all of the MySQL GRANT system has been implemented in Vitess. Authorization can be done via table-level ACLs. Individual users at the VTGate level can be assigned 3 levels of permissions.
- Read (corresponding to read DML, e.g. SELECT)
- Write (corresponding to write DML, e.g. INSERT, UPDATE, DELETE)
- Admin (corresponding to DDL, e.g. ALTER TABLE)

Vitess authorization via ACLs are applied at the VTTablet level, as opposed to on VTGate, where authentication is enforced. There are a number of VTTablet command line parameters that control the behavior of ACLs. You can see examples and read more about the command line parameters and further configuration options [here](https://vitess.io/docs/user-guides/configuration-advanced/authorization/#vttablet-parameters-for-table-acls).
The tables to which the permissions apply can be enumerated or specified using a regular expression.

Vitess authorization via ACLs is applied at the VTTablet level, as opposed to on VTGate, where authentication is enforced. There are a number of VTTablet command line parameters that control the behavior of ACLs. You can see examples and read more about the command line parameters and further configuration options [here](https://vitess.io/docs/user-guides/configuration-advanced/authorization/#vttablet-parameters-for-table-acls).
25 changes: 25 additions & 0 deletions content/en/docs/faq/advanced-configuration/components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Components
description: Frequently Asked Questions about Vitess
weight: 2
---

## How can I change MySQL server variables in Vitess?

In general, if you want to apply global variables at the MySQL level, you have to do it through VTTablet. There are a few ways to do that in the operator, but we recommend that you use vtctldclient ExecuteFetchAsDba.

For example if you want to temporarily switch `sync_binlog` off on the MySQL that is being managed by a tablet with alias `zone1-0000000100` you would perform the following:

```sh
$ vtctldclient -server localhost:15999 ExecuteFetchAsDba zone1-0000000100 "set global sync_binlog=0"
```

This would show the following result after checking the variable:

```sh
$ vtctldclient -server localhost:15999 ExecuteFetchAsDba zone1-0000000100 "show variables like 'sync_binlog'"+---------------+-------+| Variable_name | Value |+---------------+-------+| sync_binlog | 0 |+---------------+-------+
```

## Examples of how to use Vitess components

We have a couple of step through examples in Github [here](https://github.com/aquarapid/vitess_examples). Currently, these cover Operator Backup and Restore, Create Lookup Vindex, and VStream.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Metrics
description: Frequently Asked Questions about Vitess
weight: 6
weight: 8
---

## What Grafana dashboards are available?
Expand All @@ -18,4 +18,4 @@ Vitess exports per-user stats on table ACLs. There are example usages of table A

To locate the variables that enable the export of per-users stats you will need to look in `/debug/vars` for variables that start with `User`, like `UserTableQueryCount`. The export itself is a multi-dimensional export categorized by Table, User and Query Type. You can also find similar names exported as prometheus metrics.

Analyzing these variables can enable you to quickly narrow down the root cause of an incident, as these stats are fine-grained. Once you've identified the table and query type, you can then drill into `/queryz` or `/debug/query_stats` to determine if the issue is a particular query.
Analyzing these variables can enable you to quickly narrow down the root cause of an incident, as these stats are fine-grained. Once you've identified the table and query type, you can then drill into `/queryz` or `/debug/query_stats` to determine if the issue is a particular query.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Vindex
description: Frequently Asked Questions about Vitess
weight: 7
weight: 6
---

## What is a secondary Vindex? How does it work?
Expand Down Expand Up @@ -40,4 +40,4 @@ It is not necessary that a Primary Vindex be the same as the Primary Key. In fac

However, if you want the rows of the secondary table to reside in the same shard as the parent row, the Primary Vindex for that table must be the foreign key that points to the main table. A typical example is a user and order table.

In this case, the order table has the `user_id` as a foreign key to the `id` of the user table. The `order_id` may be the primary key for `order`, but you may still want to choose `user_id` as Primary Vindex, which will make a user's orders live in the same shard as the user.
In this case, the order table has the `user_id` as a foreign key to the `id` of the user table. The `order_id` may be the primary key for `order`, but you may still want to choose `user_id` as Primary Vindex, which will make a user's orders live in the same shard as the user.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: VReplication
description: Frequently Asked Questions about Vitess
weight: 5
weight: 7
---

## What is semi-sync replication?
Expand All @@ -21,4 +21,4 @@ However, if there is a network partition, things can be delayed depending on you

## Why would I use semi-sync replication?

Semi-sync replication ensures higher levels of durability between the primary and at least one replica. You can read more about semi-sync replication here.
Semi-sync replication ensures higher levels of durability between the primary and at least one replica. You can read more about semi-sync replication here.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Vschema
description: Frequently Asked Questions about Vitess
weight: 2
weight: 5
---

## How do you select your primary key for Vitess?
Expand Down Expand Up @@ -36,4 +36,4 @@ For example, if you add a table called foo to an unsharded keyspace called ks1 t

However, if you have more than one keyspace you will not be able to access the table from the unqualified schema using select * from foo until you add the table to VSchema.

For a sharded keyspace will not be able to access the table until you have a VSchema for it. However, you will be able to see it in show tables.
For a sharded keyspace will not be able to access the table until you have a VSchema for it. However, you will be able to see it in show tables.
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ You can read additional details on the credentials file format [here](https://gi

## If mysqld slave thread isn't running what restarts it?

The replication reporter will automatically restart mysqld slave thread if it is not running. The replication reporter can be enabled within vttablet with the flag `-enable_replication_reporter`.
The replication reporter will automatically restart mysqld slave thread if it is not running. The replication reporter can be enabled within vttablet with the flag `-enable_replication_reporter`.
25 changes: 0 additions & 25 deletions content/en/docs/faq/advanced-configurations/components.md

This file was deleted.

0 comments on commit 1a26623

Please sign in to comment.