Skip to content
Snippets Groups Projects
Commit 4c17ccf6 authored by Alex Ellis's avatar Alex Ellis
Browse files

Mention Afterburn update


Signed-off-by: default avatarAlex Ellis <alexellis2@gmail.com>
parent 922923d1
No related branches found
No related tags found
No related merge requests found
...@@ -84,7 +84,21 @@ The watchdog can be configured through environmental variables. You must always ...@@ -84,7 +84,21 @@ The watchdog can be configured through environmental variables. You must always
## Advanced / tuning ## Advanced / tuning
**Working with HTTP headers** ### of-watchdog and AfterBurn
* of-watchdog
A new version of the watchdog is being tested over at [openfaas-incubator/of-watchdog](https://github.com/openfaas-incubator/of-watchdog).
This re-write is mainly structural for on-going maintenance. It will be a drop-in replacement for the existing watchdog and also has binary releases available.
* AfterBurn Optimizations
Forking a new process per request has many advantages for isolation, simplicity and means any process can be a function without any additional code. AfterBurn is an optimization which maintains one single process between all requests and means a Java function can execute a round-trip in as little as 10-12ms without further tuning. It relies on a simple client library maintained by this project for each runtime language.
You can read about [AfterBurn](https://blog.alexellis.io/openfaas-serverless-acceleration/) on my blog. It is supported by the of-watchdog and a version is also available for the existing watchdog in [PR #224](https://github.com/openfaas/faas/pull/224).
### Working with HTTP headers
Headers and other request information are injected into environmental variables in the following format: Headers and other request information are injected into environmental variables in the following format:
...@@ -132,7 +146,7 @@ Http_Query=action=quote&qty=1&productId=105 ...@@ -132,7 +146,7 @@ Http_Query=action=quote&qty=1&productId=105
You can now use HTTP state from within your application to make decisions. You can now use HTTP state from within your application to make decisions.
**HTTP methods** ### HTTP methods
The HTTP methods supported for the watchdog are: The HTTP methods supported for the watchdog are:
...@@ -144,7 +158,7 @@ Without a body: ...@@ -144,7 +158,7 @@ Without a body:
> The API Gateway currently supports the POST route for functions. > The API Gateway currently supports the POST route for functions.
**Content-Type of request/response** ### Content-Type of request/response
By default the watchdog will match the response of your function to the "Content-Type" of the client. By default the watchdog will match the response of your function to the "Content-Type" of the client.
...@@ -153,11 +167,11 @@ By default the watchdog will match the response of your function to the "Content ...@@ -153,11 +167,11 @@ By default the watchdog will match the response of your function to the "Content
To override the Content-Type of all your responses set the `content_type` environmental variable. To override the Content-Type of all your responses set the `content_type` environmental variable.
**I don't want to use the watchdog** ### I don't want to use the watchdog
This is an unsupported use-case for the OpenFaaS project however if your container exposes HTTP POST on port 8080 then the OpenFaaS API gateway and other tooling will manage your container. This is an unsupported use-case for the OpenFaaS project however if your container exposes HTTP POST on port 8080 then the OpenFaaS API gateway and other tooling will manage your container.
**Tuning auto-scaling** ### Tuning auto-scaling
Auto-scaling starts at 1 replica and steps up in blocks of 5: Auto-scaling starts at 1 replica and steps up in blocks of 5:
...@@ -172,4 +186,6 @@ You can override the upper limit of auto-scaling by setting the following label ...@@ -172,4 +186,6 @@ You can override the upper limit of auto-scaling by setting the following label
com.faas.max_replicas: "10" com.faas.max_replicas: "10"
``` ```
If you want to disable scaling, set the `com.faas.max_replicas` value to `"1"`. In Docker Swarm you can disable scaling, set the `com.faas.max_replicas` value to `"1"`.
As an alternative you can also remove or scale AlertManager to zero replicas.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment