You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `of-watchdog`is a new version of the OpenFaaS watchdog which provides the original STDIO mode from the Classic Watchdog along with a new HTTP `mode`.
9
+
The `of-watchdog`implements a HTTP server listening on port 8080, and acts as a reverse proxy for running functions and microservices. It can be used independently, or as the entrypoint for a container with OpenFaaS.
8
10
9
-
See also: [Classic Watchdog](https://github.com/openfaas/faas/tree/master/watchdog)
11
+
This version of the OpenFaaS watchdog adds support for HTTP proxying as well as STDIO, which enables re-use of memory and very fast serving of requests. It does not aim to replace the [Classic Watchdog](https://github.com/openfaas/faas/tree/master/watchdog), but offers another option for those who need these features.
10
12
11
13
### Goals:
12
-
* Cleaner abstractions for maintenance
13
-
* Keep function process warm for lower latency / caching / persistent connections
14
-
* Explore streaming for large files (beyond disk/RAM capacity)
History/context: the original watchdog supported mode the Serializing fork mode only and Afterburn was available for testing via a pull request.
21
+
## Modes
21
22
22
-
When the of-watchdog is complete this version will support five modes as listed below. We may consolidate or remove some of these modes before going to 1.0 so please consider modes 2-4 experimental.
23
+
There are several modes available for the of-watchdog which changes how it interacts with your microservice or function code.
23
24
24
25
### 1. HTTP (mode=http)
25
26
@@ -114,11 +115,17 @@ HTTP headers cannot be sent after function starts executing due to input/output
114
115
115
116
* Exec timeout: supported.
116
117
117
-
### 4. Afterburn (mode=afterburn)
118
+
### 4. Static (mode=static)
119
+
120
+
This mode starts an HTTP file server for serving static content found at the directory specified by `static_path`.
121
+
122
+
See an example in the [Hugo blog post](https://www.openfaas.com/blog/serverless-static-sites/).
123
+
124
+
### 5. Afterburn (mode=afterburn)
118
125
119
-
### 4.1 Status
126
+
### 5.1 Status
120
127
121
-
Afterburn should be considered for deprecation in favour of the HTTP mode.
128
+
Afterburn has been deprecated in favour of the HTTP mode.
122
129
123
130
Several sample templates are available under the OpenFaaS incubator organisation.
0 commit comments