Skip to content

Commit 1f1795c

Browse files
committed
Add some docs
1 parent 0ecc4bc commit 1f1795c

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

docs/design.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,30 @@ However, as we can't influence the query ID the query will get running on Trino
8181
Queued queries that have not been accessed for longer than 5 minutes are removed from the persistence to avoid cluttering the system with abounded queries.
8282
Doing so trino-lb behaves the same way Trino does (the relevant setting in Trino is `query.client.timeout`).
8383

84-
## 5. Autoscaling Trino clusters
84+
## 5. Zero downtime maintenance
85+
86+
You can activate and deactivate Trino clusters in trino-lb.
87+
A deactivated cluster continues to process running queries, but no new queries will be submitted to it.
88+
89+
To safely update a running Trino cluster you can
90+
91+
1. Deactivate the Trino cluster using `POST /admin/deactivate-cluster/{cluster_name}`
92+
2. Wait until all running queries have finished. Tip: You can use `GET /admin/cluster-status` to fetch the current query counter or talk to the Trino cluster directly.
93+
3. Safely do modifications to the Trino cluster without any user impact
94+
4. Once you are done with your changes re-activate the Trino cluster again using `POST /admin/activate-cluster/{cluster_name}`
95+
96+
Important: To activate/deactivate a Trino cluster you need to authenticate against trino-lb.
97+
Currently only Basic Auth is supported, you can configure the credentials like this:
98+
99+
```yaml
100+
trinoLb:
101+
adminAuthentication:
102+
basicAuth:
103+
username: trino-lb-admin
104+
password: your-password
105+
```
106+
107+
## 6. Autoscaling Trino clusters
85108
86109
You can scale the number of Trino clusters within a group based on the queue length and clusters utilization.
87110
This allows you to significantly save costs by reducing the number of clusters running.

0 commit comments

Comments
 (0)