GithubHelp home page GithubHelp logo

feat: query forward about databend HOT 4 OPEN

BohuTANG avatar BohuTANG commented on June 9, 2024 4
feat: query forward

from databend.

Comments (4)

BohuTANG avatar BohuTANG commented on June 9, 2024 1

@yufan022

Yes, we should.

Several considerations remain:

  • Handling forward failures.
  • Determining the layer for forwarding: Should it occur in the HTTP handler or at a lower level?

from databend.

yufan022 avatar yufan022 commented on June 9, 2024

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.

from databend.

yufan022 avatar yufan022 commented on June 9, 2024

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.

from databend.

BohuTANG avatar BohuTANG commented on June 9, 2024

Here's a condensed version of the protocol:

  1. Client sends a request to query-1 (warehouse-id: w1).
  2. Client sends the next request to query-2 (warehouse-id: w2), including a header with the previous warehouse-id (w1).
  3. Query-2 responds with a forward protocol(reponse with query-1 host?), instructing the client to redirect the query to query-1.
  4. Client redirects the query to query-1.
  5. Client receives the result from query-1.

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

from databend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.