@@ -9,12 +9,12 @@ Trino Gateway records history of recent queries and displays links to check quer
99details page in respective trino cluster.
1010![ trino.gateway.io] ( ./assets/trinogateway_query_history.png )
1111
12- ## Admin UI - add and modify backend information
12+ ## Cluster UI - add and modify cluster information
1313
14- The admin page is used to configure the gateway to multiple backends .
15- Existing backend information can also be modified using the same .
14+ The cluster page is used to configure Trino Gateway for multiple Trino clusters .
15+ Existing cluster information can also be modified using the edit button .
1616
17- ![ trino.gateway.io/entity] ( ./assets/trinogateway_ha_admin .png )
17+ ![ trino.gateway.io/entity] ( ./assets/trinogateway_cluster_page .png )
1818
1919
2020## Graceful shutdown
@@ -25,29 +25,32 @@ Query ID.
2525
2626To graceful shutdown a trino cluster without query losses, the steps are:
2727
28- 1 . Set the backend to deactivate state, this prevents any new incoming queries
29- from getting assigned to the backend .
30- 2 . Poll the trino backend coorinator URL until the queued query count and the
31- running query count both hit 0 .
32- 3 . Terminate the trino Coordinator & Worker Java process .
28+ 1 . Deactivate the cluster by turning off the 'Active' switch. This ensures that no
29+ new incoming queries are routed to the cluster .
30+ 2 . Poll the Trino cluster coordinator URL until the queued query count and the
31+ running query count are both zero .
32+ 3 . Terminate the Trino coordinator and worker Java processes .
3333
3434To gracefully shutdown a single worker process, refer to the [ Trino
3535documentation] ( https://trino.io/docs/current/admin/graceful-shutdown.html ) for
3636more details.
3737
3838## Query routing options
3939
40- - The default router selects the backend randomly to route the queries.
41- - If you want to route the queries to the least loaded backend for a user
42- i.e. backend with the least number of queries running or queued from a particular user ,
43- then use ` QueryCountBasedRouter ` , it can be configured by adding the module name
44- to config file's modules section like below
40+ - The default router selects the cluster randomly to route the queries.
41+ - If you want to route the queries to the least loaded cluster for a user
42+ so the cluster with the fewest running or queued queries ,
43+ use ` QueryCountBasedRouter ` . You can enable it by adding the module name
44+ to the ` modules ` section of the config file:
4545
4646``` yaml
4747modules :
4848 - io.trino.gateway.ha.module.QueryCountBasedRouterProvider
4949` ` `
50- - The router works on the stats it receives from the clusters about the load i.e number queries queued and running on a cluster at regular intervals which can be configured like below. The default interval is 1 min
50+ - The router operates based on the stats it receives from the clusters, such as
51+ the number of queued and running queries. These values are retrieved at regular
52+ intervals. This interval can be configured by setting ` taskDelaySeconds` under
53+ ` monitor` section in the config file. The default interval is 60
5154` ` ` yaml
5255monitor:
5356 taskDelaySeconds: 10
0 commit comments