You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently vtgate has support for filtering tablets, but only by keyspace/shard or key-range:
--tablet_filters strings Specifies a comma-separated list of 'keyspace|shard_name or keyrange' values to filter the tablets to watch.
This RFC proposes that vtgate supports filtering by KVs in the Tags map[string]string map of Tablet topodata.Tablet structs. This filtering would work in addition to the mutually-exclusive filters --tablet_filters and --keyspaces_to_watch
This filtering support would allow users more flexibility in routing queries from vtgate, specifically for testing upgrades, performance of new hardware, etc
I envision this support being controlled by a new tabletvtgate flag that allows a list of KVs, such as: --tablet-filter-tags "mysql_version:8.0,instance_type:i3.xlarge". Users can apply these tag KVs using this existing vttablet flag (that adds the KVs to the Tags map[string]string of topodata.Tablet):
--init_tags StringMap (init parameter) comma separated list of key:value pairs used to tag the tablet
The existing filtering code can support a condition to filter on tablets that match these tags only
Use Case(s)
A user that would like to direct traffic to specific tablets using arbitrary tablet tags, for example:
To test upgrading to MySQL 8.x could filter by tag mysql_version:8.0
To test upgrading tablets to a newer Vitess release, eg: vitess_major_version:19
To test new hardware classes, eg: instance_type:i3.xlarge
The text was updated successfully, but these errors were encountered:
I envision this support being controlled by a new tablet flag that allows a list of KVs, such as:
--tablet_filter_tags "mysql_version:8.0,instance_type:i3.xlarge".
I actually did not realize vttablet has tags; we don't really utilize this anywhere yet as far as I can see, but given they exist this is a sensible use case.
Currently
vtgate
has support for filtering tablets, but only by keyspace/shard or key-range:This RFC proposes that
vtgate
supports filtering by KVs in theTags map[string]string
map of Tablettopodata.Tablet
structs. This filtering would work in addition to the mutually-exclusive filters--tablet_filters
and--keyspaces_to_watch
This filtering support would allow users more flexibility in routing queries from
vtgate
, specifically for testing upgrades, performance of new hardware, etcI envision this support being controlled by a new
tabletvtgate
flag that allows a list of KVs, such as:--tablet-filter-tags "mysql_version:8.0,instance_type:i3.xlarge"
. Users can apply these tag KVs using this existingvttablet
flag (that adds the KVs to theTags map[string]string
oftopodata.Tablet
):The existing filtering code can support a condition to filter on tablets that match these tags only
Use Case(s)
mysql_version:8.0
vitess_major_version:19
instance_type:i3.xlarge
The text was updated successfully, but these errors were encountered: