The Content-Type header must be ignored when the Transfer
Encoding is set to "chunked" because the length is unknown
Go sets this to -1 and we pass that onto the user:
https://golang.org/src/net/http/transfer.go
The value of Content_Length is currently set to -1 in this
scenario, however it caused some confusion for at least one
user in issue: #1422.
The Http_Transfer_Encoding value was tested by running the
watchdog on Linux with "env" as the fprocess and an extra
header to "curl"
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This enables limiting concurrency. It is a naive approach which
will reject requests as soon as they exceed the maximum number
of in-flight requests.
It is a port of the following PR from the new watchdog code:
https://github.com/openfaas-incubator/of-watchdog/pull/54
Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
We need to update the watchdog version for sample functions to 0.9.14
including all references in markdown files.
Signed-off-by: Ron Rivera <roncrivera@gmail.com>
- Removes use of "our" from CONTRIBUTING guide
- Updates/adds README.md files
- Commnents and typo fix in watchdog
- Adds good/bad examples of commit messages
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
- the shutdown sequence meant that the kubelet was still passing
work to the watchdog after the HTTP socket was closed. This change
means that the kubelet has a chance to run its check before we
finally stop accepting new connections. It will require some
basic co-ordination between the kubelet's checking period and the
"write_timeout" value in the container.
Tested with Kubernetes on GKE - before the change some Pods were
giving a connection refused error due to them being not detected
as unhealthy. Now I receive 0% error rate even with 20 qps.
Issue was shown by scaling to 20 replicas, starting a test with
hey and then scaling to 1 replica while tailing the logs from the
gateway. Before I saw some 502, now I see just 200s.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
Convert all sample-functions to use curl to get the watchdog as
it can be cached by Docker. Issue #841
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
This updates fwatchdog to latest version (0.7.9) in all templates
in sample-functions and faas version in the documentation
Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
This enables an often-requested feature to separate stderr
from stdout within function responses. New flag combine_output is on
by default to match existing behaviour. When combine_output is set
to false it redirects stderr to the container logs rather than
combining it into the function response.
Tested with unit tests for default behaviour and new behaviour.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
Note, not all `alexellis/github` references should be changed, there are
a number of repos which are not part of the openfaas org, this commit
excludes those.
Signed-off-by: John McCabe <john@johnmccabe.net>
- Watchdog - allow new methods with and without body.
- Enforce hard-timeout via exec_timeout variable.
- Correct bug in timeouts for read/write of HTTP.
- Documentation for new verbs and hard timeout.
Signed-off-by: Alex Ellis <alexellis2@gmail.com>