Comments (2)
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.
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)
- Can multiple functions be run on a single runtime? HOT 1
- Question: Import path for common modules HOT 2
- requests schedule policy in openfaas HOT 1
- Is there a workflow tool for OpenFaaS? HOT 3
- some companies appear twice in the adopters list HOT 2
- Support Azure service bus topic/subscription HOT 1
- RPC and openfaas HOT 1
- Question about OpenAPI Spec 3.1 HOT 2
- [Improvement] OpenFaaS operator installation
- The README.md under fass/api-docs has an incorrect URL to the api spec file
- Setup repository locally
- Function failed to deploy with status code: 500 HOT 2
- Openfaas install gateway Crash HOT 2
- Consultation on the usage permissions of the community version
- Unable to log in to the gateway - connection refused HOT 8
- How do I use a tensorflow base image in the Dockerfile template? Is it possible? HOT 3
- Is the http_request_duration_seconds metric included in OpenFaaS CE? HOT 4
- Enabling "scaling to zero" functionality on faasd HOT 3
- [Question] Pricing options for freelance/solo developers? HOT 1
- [Question] How to Deploy OpenFaaS on Docker Compose in Non-Swarm Mode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faas.