Skip to content

Commit 48b34d1

Browse files
committed
Move explanation of TrinoStatus to its own section in routing-rules page
1 parent 66daf9e commit 48b34d1

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

docs/routing-rules.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,21 @@ condition: 'request.getHeader("X-Trino-Client-Tags") contains "label=foo"'
134134

135135
If no rules match, then request is routed to adhoc.
136136

137+
### TrinoState
138+
139+
This class attempts to track the current state of Trino cluster. It is updated per every healthcheck.
140+
There are three possible states
141+
142+
* PENDING
143+
* A Trino cluster will show this state when it is still starting up. It will be treated as
144+
unhealthy by RoutingManager, and therefore requests will not be routed to PENDING clusters
145+
* HEALTHY
146+
* A Trino cluster will show this state when healthchecks report clusters as healthy and ready.
147+
RoutingManager will only route requests to healthy clusters
148+
* UNHEALTHY
149+
* A Trino cluster will show this state when healthchecks report clusters as unhealthy. RoutingManager
150+
will not route requests to unhealthy clusters.
151+
137152
### TrinoRequestUser
138153

139154
This class attempts to extract the user from a request. In order, it attempts

gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/TrinoStatus.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
*/
1414
package io.trino.gateway.ha.clustermonitor;
1515

16-
/**
17-
* PENDING is for ui/observability purpose and functionally it's unhealthy
18-
* We should use PENDING when Trino clusters are still spinning up
19-
* HEALTHY is when health checks report clusters as up
20-
* UNHEALTHY is when health checks report clusters as down
21-
*/
2216
public enum TrinoStatus
2317
{
2418
PENDING,

0 commit comments

Comments
 (0)