Git Product home page Git Product logo

Comments (2)

kevin-lindsay-1 avatar kevin-lindsay-1 commented on September 24, 2024 1

I think that options 1 and 2 should both be included, and that option 2 should be opt-in for the sake of backwards compatibility.

Here's a truth table for describing the cases using only option 1:

source x-openfaas-component
infrastructure/function
gateway gateway
queue worker queue-worker
watchdog watchdog
multiple queue-worker; gateway

As you can see, in this approach you don't know if the response is coming from infrastructure (non-openfaas, non-function. k8s, istio, etc) or from the function.

Here's another table using only option 2:

source x-openfaas-component
infrastructure/gateway/queue worker/watchdog
function function

This option only lets you know if the response came from a function. All cases other than the function are effectively unknown as to what the source was.

Here's a final table using both:

source x-openfaas-component
infrastructure
gateway gateway
queue worker queue-worker
watchdog watchdog
function function
multiple queue-worker; gateway

This approach allows you know the most; it allows you to know if the response came from inside openfaas, the user's function, or some other unknown/infrastructural source.


As for whether or not option 1 should be "only when an OF component has an error", I would like to clarify that I don't think that's specifically necessary to call out, as the source of a response should effectively be invisible to the user unless there's an error. In other words, there's no specific reason why the x-openfaas-component cannot be set when the response is not an error, but in normal operating procedure, the other components are not responding, they are proxying, and therefore the response itself isn't coming from them.

If it matters, you could have a header stating every OF component that "touched" this request along the way, but that's more of a debug feature in my opinion.

from faas.

alexellis avatar alexellis commented on September 24, 2024

Summarised from Kevin on weekly call:

Responses coming from OpenFaaS components should be retried according to a default retry policy - i.e. defined in Helm chart.

Responses not coming from OpenFaaS components would be retried according to the configured policy on the component i.e. queue-worker / connector.

Responses coming from function would use the retry configuration set through annotations on the function. If no annotations are set the function would not be retried. This functionality should be opt-in and can be turned on via a parameter in the chart. This would need the watchdog update.

from faas.

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.