Load balancing scheme in Trino gateway?
pulkitkalia1994 opened this issue · comments
What's the load balancing scheme used by Trino gateway? And is there a way to change it?
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.
@vishalya can you potentially take this on to document as part of the update for the linked PR ?