-
Notifications
You must be signed in to change notification settings - Fork 760
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
feat: query forward #15127
Comments
Do we need to consider failure? sql callers need to know clearly whether sql execution succeeds or fails. If forwarding fails and returns execution fails, but the actual sql is still executing, it will cause confusion. |
Yes, we should. Several considerations remain:
|
some sugesstion: The forwarding path should not change if the number of query members changes(in process of scale-in or scale-out). If the client side gets SQL execution failure, then it must really fail, no matter on any node. |
Here's a condensed version of the protocol:
This protocol ensures that the client interacts with the correct query node based on the previous request's warehouse-id, maintaining consistency and safety in a 3-node cluster. I am not sure this works in k8s, please clarify, @ZhiHanZ |
It makes sense, basically in kubernetes, if we contain any state on header using deployment as databend onboarding app, the query forward have to be handled by several workaround. Either using a customized gateway/nginx/istio/ingress controller, such kind of workarounds are still fragile to changes, if we could implement the feature on kernel, we could have more simple and easy way to deploy databend on any environment. cc @BohuTANG , I think we need to prioritize the issue. |
Summary
Assuming we have a Databend cluster with three nodes, each serving as a service:
Node-1: Create a query ID X. If the query is sent to Node-2 but not found, forward it to Node-1.
Benefits:
The text was updated successfully, but these errors were encountered: