$alias needs to be of the form: <cell>-id, and the cell should match one of the local cells that was created in the topology. The id can be left padded with zeroes: cell-100 and cell-000000100 are synonymous.
Even if a MySQL is external, you can still make vttablet perform some management functions. They are as follows:
--disable_active_reparents: If this flag is set, then any reparent or replica commands will not be allowed. These are InitShardMaster, PlannedReparent, PlannedReparent, EmergencyReparent, and ReparentTablet. In this mode, you should use the TabletExternallyReparented command to inform vitess of the current primary.
--replication_connect_retry: This value is give to mysql when it connects a replica to the primary as the retry duration parameter.
--enable_replication_reporter: If this flag is set, then vttablet will transmit replica lag related information to the vtgates, which will allow it to balance load better. Additionally, enabling this will also cause vttablet to restart replication if it was stopped. However, it will do this only if --disable_active_reparents was not turned on.
--heartbeat_enable and --heartbeat interval duration: cause vttablet to write heartbeats to the sidecar database. This information is also used by the replication reporter to assess replica lag.
Size of the connection pool for app connections (default 40)
Path to a file containing the Azure Storage account key; if this flag is unset, the environment variable VT_AZBLOB_ACCOUNT_KEY will be used as the key itself (NOT a file path)
Azure Storage Account name for backups; if this flag is unset, the environment variable VT_AZBLOB_ACCOUNT_NAME will be used
Azure Blob Container Name
Azure Blob operation parallelism (requires extra memory when increased) (default 1)
Root prefix for all backup-related Azure Blobs; this should exclude both initial and trailing '/' (e.g. just 'a/b' not '/a/b/')
Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin")
if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000)
if set, the backup files will be compressed (default is true). Set to false for instance if a backup_storage_hook is specified and it compresses the data. (default true)
if set, we send the contents of the backup files through this hook.
which implementation to use for the backup storage feature
if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression (default 2)
the server ca to use to validate servers when connecting
the cert to use to connect
the key to use to connect
the server name to use to validate server certificate
the protocol to download binlogs from a vttablet (default "grpc")
True iff the binlog streamer should use V3-style sharding, which doesn't require a preset sharding key column. (default true)
Path to JSON config file for ceph backup storage (default "ceph_backup_config.json")
JSON File to read the topos/tokens from.
write cpu profile to file
host to send spans to. if empty, no tracing will be done
port to send spans to. if empty, no tracing will be done
db credentials file; send SIGHUP to reload this file
db credentials server type (use 'file' for the file implementation) (default "file")
db allprivs password
Set this flag to false to make the allprivs connection to not use SSL (default true)
db allprivs user userKey (default "vt_allprivs")
db app password
Set this flag to false to make the app connection to not use SSL (default true)
db app user userKey. Used for VReplication. (default "vt_app")
db appdebug password
Set this flag to false to make the appdebug connection to not use SSL (default true)
db appdebug user userKey (default "vt_appdebug")
Sets the character set for the connection.
connection timeout to mysqld in milliseconds (0 for no timeout)
db dba password
Set this flag to false to make the dba connection to not use SSL (default true)
db dba user userKey (default "vt_dba")
db erepl password
Set this flag to false to make the erepl connection to not use SSL (default true)
db erepl user userKey (default "vt_erepl")
db filtered password
Set this flag to false to make the filtered connection to not use SSL (default true)
db filtered user userKey (default "vt_filtered")
Flag values as defined by MySQL.
Flavor overrid. Valid value is FilePos.
The host name for the tcp connection.
db repl password
Set this flag to false to make the repl connection to not use SSL (default true)
db repl user userKey (default "vt_repl")
server name of the DB we are connecting to.
The unix socket to connect on. If this is specified, host and port will not be used.
connection SSL ca
connection SSL ca path
connection SSL certificate
connection SSL key
Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3
Idle timeout for dba connections (default 1m0s)
Size of the connection pool for dba connections (default 20)
replication lag after which a replica is considered degraded (only used in status UI) (default 30s)
if set, do not allow active reparents. Use this to protect a cluster using external reparents.
the replication lag that is considered too high when selecting the minimum num vttablets for serving (default 2h0m0s)
the replication lag that is considered low enough to be healthy (default 30s)
true iff we should emit stats to push-based monitoring/stats backends
This option enables the query consolidator. (default true)
This option enables the query consolidator only on replicas.
This option fetches & caches fields (columns) when storing query plans (default true)
If true replication-lag-based throttling on transactions will be enabled.
If true, incoming transactions for the same row (range) will be queued and cannot consume all txpool slots.
If true, hot row protection is not enforced but logs if transactions would have been queued.
Register the health check module that monitors MySQL replication
DEPRECATED - Set the correct durability policy on the keyspace instead.
If true, limit on number of transactions open at the same time will be enforced for all users. User trying to open a new transaction after exhausting their limit will receive an error immediately, regardless of whether there are available slots or not.
If true, limit on number of transactions open at the same time will be tracked for all users, but not enforced.
if this flag is true, vttablet will fail to start if a valid tableacl config does not exist
If true, vttablet requires MySQL to run with STRICT_TRANS_TABLES or STRICT_ALL_TABLES on. It is recommended to not turn this flag off. Otherwise MySQL may alter your supplied values before saving them to the database. (default true)
root directory for the file backup storage -- this path must be on shared storage to provide a global view of backups to all vitess components
file based custom rule path
Timeout for the finalize stage of a fast external reparent reconciliation. (default 30s)
Google Cloud Storage bucket to use for backups
root prefix for all backup-related object names
Which auth plugin implementation to use (eg: static)
List of substrings of at least one of the client certificate names (separated by colon).
when using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server
JSON File to read the users/passwords from.
ca to use, requires TLS, and enforces client cert check
certificate to use, requires grpc_key, enables TLS
how to compress gRPC, default: nothing, supported: snappy
Enable GRPC tracing
grpc initial connection window size
grpc initial window size
After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. (default 10s)
After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s)
key to use, requires grpc_cert, enables TLS
Maximum age of a client connection before GoAway is sent. (default 2562047h47m16.854775807s)
Additional grace period after grpc_max_connection_age, after which connections are forcibly closed. (default 2562047h47m16.854775807s)
Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216)
grpc server permit client keepalive pings even when there are no active streams (RPCs)
Interval between health checks (default 20s)
If true, vttablet records (if primary) or checks (if replica) the current time of a replication heartbeat in the table _vt.heartbeat. The result is used to inform the serving state of the vttablet via healthchecks.
How frequently to read and write replication heartbeat. (default 1s)
Number of concurrent transactions let through to the txpool/MySQL for the same hot row. Should be > 1 to have enough 'ready' transactions in MySQL and benefit from a pipelining effect. (default 5)
Global queue limit across all row (ranges). Useful to prevent that the queue can grow unbounded. (default 1000)
Maximum number of BeginExecute RPCs which will be queued for the same row (range). (default 20)
(init parameter) override the name of the db used by vttablet. Without this flag, the db name defaults to vt_
(init parameter) keyspace to use for this tablet
(init parameter) populate metadata tables even if restore_from_backup is disabled. If restore_from_backup is enabled, metadata tables are always populated regardless of this flag.
(init parameter) shard to use for this tablet
(init parameter) the tablet type to use for this tablet.
(init parameter) comma separated list of key:value pairs used to tag the tablet
(init parameter) timeout to use for the init phase. (default 1m0s)
host and port to send spans to. If empty, no tracing will be done
keep logs for this long (using ctime) (zero to keep forever). Note ctime here means "change time" and can be essentially equivalent to mtime. Read #5318
keep logs for this long (using mtime) (zero to keep forever)
keep running at least this long after SIGTERM before stopping (default 50ms)
use the legacy algorithm when selecting the vttablets for serving (default true)
How long to keep the table locked before timing out (default 1m0s)
when logging hits line file:N, emit a stack trace
If non-empty, write log files in this directory
log stack traces for errors
Enable query logging to syslog.
Enable query logging to the specified file
size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
log to standard error instead of files
how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s)
profile every n bytes allocated (default 524288)
the minimum number of vttablets that will be continue to be used even with low replication lag (default 2)
profile every n mutex contention events (see runtime.SetMutexProfileFraction)
path to my.cnf, if reading all config params from there
mysql binlog path
data directory for mysql
mysql error log path
mysql general log path
Innodb data home directory
Innodb log group home directory
mysql master.info file
port mysql is listening on
mysql pid file
mysql relay log index path
mysql relay log info path
mysql relay log path
mysql server id of the server (if specified, mycnf-file will be ignored)
mysql slow query log path
mysql socket file
mysql tmp directory
JSON File to read the users/passwords from.
JSON representation of the users/passwords config.
Delay after which buffered response will flushed to client. (default 100ms)
MySQL server version to advertise.
the protocol to use to talk to the mysqlctl server (default "grpc")
template file to use for generating the my.cnf file during server init
socket file to use for remote mysqlctl actions (empty for local actions)
wait no more than this for OnTermSync handlers before stopping (default 10s)
URI of opentsdb /api/put method
(Optional) Basic auth password to authenticate with Orchestrator's HTTP API.
Address of Orchestrator's HTTP API (e.g. http://host:port/api/). Leave empty to disable Orchestrator integration.
(Optional) Basic auth username to authenticate with Orchestrator's HTTP API. Leave empty to disable basic auth.
How often to ping Orchestrator's HTTP API endpoint to tell it we exist. 0 means never.
Timeout for calls to Orchestrator's HTTP API (default 30s)
If set, the process will write its pid to the named file, and delete it on graceful shutdown.
if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
port for the server
how often try to remove old logs (default 1h0m0s)
URL handler for streaming queries log (default "/debug/querylog")
string that must be present in the query as a comment for the query to be logged, works for both vtgate and vttablet
format for query logs ("text" or "json") (default "text")
an acl that exempt from table acl checking (this acl is free to access any vitess tables).
If this flag is enabled, tabletserver will emit monitoring metrics and let the request pass regardless of table acl check results
query server idle timeout (in seconds), vttablet manages various mysql connection pools. This config means if a connection has not been used in given idle timeout, this connection will be removed from pool. This effectively manages number of connection objects and optimize the pool performance. (default 1800)
query server max result size, maximum number of rows allowed to return from vttablet for non-streaming queries. (default 10000)
query server message postpone cap is the maximum number of messages that can be postponed at any given time. Set this number to substantially lower than transaction cap, so that the transaction pool isn't exhausted by the message subsystem. (default 4)
query server pass through all dml statements without rewriting
query server read pool prefill parallelism, a non-zero value will prefill the pool using the specified parallism.
query server read pool size, connection pool is used by regular queries (non streaming, not in a transaction) (default 16)
query server query cache size, maximum number of queries to be cached. vttablet analyzes every incoming query and generate a query plan, these plans are being cached in a lru cache. This config controls the capacity of the lru cache. (default 5000)
query server query pool timeout (in seconds), it is how long vttablet waits for a connection from the query pool. If set to 0 (default) then the overall query timeout is used instead.
query server query pool waiter limit, this is the maximum number of queries that can be queued waiting to get a connection (default 5000)
query server query timeout (in seconds), this is the query timeout in vttablet side. If a query takes more than this timeout, it will be killed. (default 30)
query server schema reload time, how often vttablet reloads schemas from underlying MySQL instance in seconds. vttablet keeps table schemas in its own memory and periodically refreshes it from MySQL. This config controls the reload time. (default 1800)
query server stream pool prefill parallelism, a non-zero value will prefill the pool using the specified parallelism
query server stream connection pool size, stream pool is used by stream queries: queries that return results to client in a streaming fashion (default 200)
query server stream pool waiter limit, this is the maximum number of streaming queries that can be queued waiting to get a connection (default unlimited)
only allow queries that pass table acl checks
prevent bind vars from escaping in client error messages
query server transaction cap is the maximum number of transactions allowed to happen at any given point of a time for a single vttablet. E.g. by setting transaction cap to 100, there are at most 100 transactions will be processed by a vttablet and the 101th transaction will be blocked (and fail if it cannot get connection within specified timeout) (default 20)
The maximum MySQL replication lag (in seconds) that can exist on a vstreamer (source) before starting another round of copying rows. This helps to limit the impact on the source tablet. (default 43200)
healthcheck retry delay (default 5s)
healthcheck retry delay (default 1m0s)
refresh interval for re-reading the topology (default 30s)
stop automatically retrying when we've had consecutive failures with the same error for this long after the first occurrence (default 0, unlimited)
delay before retrying a failed binlog connection (default 5s)
comma separated list of tablet types used as a source (default "in_order:REPLICA,PRIMARY")
Byte size at which a VStreamer will attempt to rotate the source's open binary log before starting a GTID snapshot based stream (e.g. a ResultStreamer or RowStreamer) (default 67108864 (64MiB))
Suggested packet size for VReplication streamer. This is used only as a recommendation. The actual packet size may be more or less than this amount. (default 30000)
address of a vtctld instance
how to talk to vtgate (default "grpc")
(init restore parameter) if this is greater than 0, instead of starting up empty when no backups are found, keep checking at this interval for a backup to appear
When enabled, vttablet will stream the MySQL replication stream from the local server, and use it to support the include_event_token ExecuteOptions.
flags to pass to xbstream command during restore. These should be space separated and will be added to the end of the command. These need to match the ones used for backup e.g. --compress / --decompress, --encrypt / --decrypt
flags to pass to backup command. These should be space separated and will be added to the end of the command
flags to pass to prepare command. These should be space separated and will be added to the end of the command
directory location of the xtrabackup executable, e.g., /usr/bin
which mode to use if streaming, valid values are tar and xbstream (default "tar")
Size in bytes of each block that gets sent to a given stripe before rotating to the next stripe (default 102400)
If greater than 0, use data striping across this many destination files to parallelize data transfer and decompression
User that xtrabackup will use to connect to the database server. This user must have all necessary privileges. For details, please refer to xtrabackup documentation.
--restore_from_backup: The default value for this flag is false. If set to true, and the my.cnf file was successfully loaded, then vttablet can perform automatic restores as follows:
If started against a mysql instance that has no data files, it will search the list of backups for the latest one, and initiate a restore. After this, it will point the mysql to the current primary and wait for replication to catch up. Once replication is caught up to the specified tolerance limit, it will advertise itself as serving. This will cause the vtgates to add it to the list of healthy tablets to serve queries from.
If this flag is true, but my.cnf was not loaded, then vttablet will fatally exit with an error message.
You can additionally control the level of concurrency for a restore with the --restore_concurrency flag. This is typically useful in cloud environments to prevent the restore process from becoming a 'noisy' neighbor by consuming all available disk IOPS.