Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load balancing scheme in Trino gateway? #84

Open
pulkitkalia1994 opened this issue Oct 30, 2023 · 2 comments
Open

Load balancing scheme in Trino gateway? #84

pulkitkalia1994 opened this issue Oct 30, 2023 · 2 comments

Comments

@pulkitkalia1994
Copy link

What's the load balancing scheme used by Trino gateway? And is there a way to change it?

@lambrospetrou
Copy link

lambrospetrou commented Oct 31, 2023

By default the gateway picks a random cluster within the matched routing group. See https://github.com/trinodb/trino-gateway/blob/main/gateway-ha/src/main/java/io/trino/gateway/ha/handler/QueryIdCachingProxyHandler.java#L249 and https://github.com/trinodb/trino-gateway/blob/main/gateway-ha/src/main/java/io/trino/gateway/ha/router/RoutingManager.java#L91

I don't think this can change. You can play with the routing groups and the explicit header to route the query to certain clusters though.

@mosabua
Copy link
Member

mosabua commented Jan 24, 2024

@vishalya can you potentially take this on to document as part of the update for the linked PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants