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

Implement stickiness in Trino-gateway's routing algorithm #475

Open
0x726f opened this issue Sep 19, 2024 · 0 comments
Open

Implement stickiness in Trino-gateway's routing algorithm #475

0x726f opened this issue Sep 19, 2024 · 0 comments

Comments

@0x726f
Copy link

0x726f commented Sep 19, 2024

Hi folks,
Wanted to get some initial thoughts on a proposal for session-based query routing in the Gateway, along with some background on our use-case.

Our current setup
Our production setup currently has several Trino clusters that are sitting behind Trino-Gateway; depending on the type of query and use-case, Trino-gateway forwards the request to one of many routing groups.

Where this breaks
We're planning to use Starburst Warp Speed to help reduce latency in talking to data lakes. However, the current query routing implementation in the gateway doesn't support stickiness and will not help us utilize the Warp speed to the maximum.

Proposed solution
Introduce a new session-based query routing algorithm that does a deterministic assignment of queries to downstream clusters based on the session-Id provided by the client through a new header, say X-External-Session-Id. Any deterministic algorithm works, as long as there are guarantees around queries with the same session-Id being routed to the same downstream cluster.

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

1 participant