Skip to content

Commit 18bbb13

Browse files
authored
Reword routing logic docs
- To use Trino cluster instead of backend
1 parent 27207fe commit 18bbb13

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/routing-logic.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,39 @@
33
## Overview
44

55
Trino Gateway checks incoming requests to see if they're related to previous
6-
ones it handled. If they are, then Trino Gateway sends them to the same backend
7-
that dealt with the earlier requests.
6+
ones it handled. If they are, then Trino Gateway sends them to the same
7+
Trino cluster that dealt with the earlier requests.
88

99
If it is a new request, the Trino Gateway refers to [Routing rules](routing-rules.md)
10-
to decide which group of backends, called a 'Routing Group,' should handle it.
11-
It then picks a backend from that Routing Group to handle the request using
10+
to decide which group of clusters, called a 'Routing Group,' should handle it.
11+
It then picks a cluster from that Routing Group to handle the request using
1212
either an adaptive or round-robin strategy.
1313

1414
![Request Routing Flow](assets/gateway-routing-flow.svg)
1515

1616
## Sticky routing
1717

1818
A request related to an ongoing process, or to state maintained on a single
19-
backend cluster, must be routed to that backend for proper handling. Two
19+
Trino cluster, must be routed to that cluster for proper handling. Two
2020
mechanisms for identifying related requests are currently implemented. By default,
2121
only routing based on query identifier is enabled.
2222

2323
### Routing based on query identifier (default)
2424

2525
When a query is initiated through the Trino Gateway, the query id will be
26-
extracted from the response and mapped to the backend that provided the
26+
extracted from the response and mapped to the cluster that provided the
2727
response. Any subsequent request containing that query id will be forwarded
28-
to that backend. For example, to retrieve query results, the trino client
28+
to that cluster. For example, to retrieve query results, the Trino client
2929
polls a URI of the form
3030
`v1/statement/executing/queryid/nonce/counter`. The Trino Gateway will extract
3131
the queryid from this URI.
3232

3333
### Routing based on cookies
3434

35-
OAuth2 authentication requires that the same backend is used for each step of
35+
OAuth2 authentication requires that the same cluster is used for each step of
3636
the handshake. When `gatewayCookieConfiguration.enabled` is set to true, a cookie
3737
will be added to requests made to paths beginning with `/oauth2` unless they already have
38-
a cookie present, which is used to route further `/oauth2/*` requests to the correct backend.
38+
a cookie present, which is used to route further `/oauth2/*` requests to the correct cluster.
3939
Cookies are not added to requests to `v1/*` and other Trino endpoints.
4040

4141
Trino Gateway signs its cookies to ensure that they are not tampered with. You
@@ -54,7 +54,7 @@ the paths used to define the OAuth handshake may be modified.
5454

5555
`routingPaths`: If the request URI starts with a path in this list, then
5656
* If no cookie is present, add a routing cookie
57-
* If a cookie is present, route the request to the backend defined by that cookie
57+
* If a cookie is present, route the request to the cluster defined by that cookie
5858

5959
`deletePaths`: If the request URI starts with a path in this list,
6060
return a response that instructs the client to delete the cookie.

0 commit comments

Comments
 (0)