The SHOW TRAFFIC RULE
syntax is used to query specified dual routing rule.
ShowTrafficRule ::=
'SHOW' 'TRAFFIC' ('RULES' | 'RULE' ruleName)?
ruleName ::=
identifier
ruleName
not specified, the default is show all traffic rulesColumn | Description |
---|---|
name | traffic rule name |
labels | compute node labels |
algorithm_type | traffic algorithm type |
algorithm_props | traffic algorithn properties |
load_balancer_type | load balancer type |
load_balancer_props | load balancer properties |
SHOW TRAFFIC RULE sql_match_traffic;
mysql> SHOW TRAFFIC RULE sql_match_traffic;
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| name | labels | algorithm_type | algorithm_props | load_balancer_type | load_balancer_props |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| sql_match_traffic | OLTP | SQL_MATCH | sql=SELECT * FROM t_order WHERE order_id = 1; UPDATE t_order SET order_id = 5; | RANDOM | |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
1 row in set (0.00 sec)
SHOW TRAFFIC RULES;
mysql> SHOW TRAFFIC RULES;
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| name | labels | algorithm_type | algorithm_props | load_balancer_type | load_balancer_props |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| sql_match_traffic | OLTP | SQL_MATCH | sql=SELECT * FROM t_order WHERE order_id = 1; UPDATE t_order SET order_id = 5; | RANDOM | |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
1 row in set (0.04 sec)
SHOW
, TRAFFIC
, RULE
, RULES