Skip to content

Commit 4f21ee3

Browse files
committed
doc(healthcheck): update health check documentation
1 parent b588883 commit 4f21ee3

1 file changed

Lines changed: 42 additions & 29 deletions

File tree

src/using-deis/configuring-an-application.md

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -77,34 +77,47 @@ appname to the old one:
7777

7878
## Custom Health Checks
7979

80-
By default, Deis only checks that a container is running. You can add a healthcheck by configuring a
81-
URL, port, initial delay, and timeout value:
82-
83-
$ deis config:set HEALTHCHECK_URL=/200.html
84-
=== peachy-waxworks
85-
HEALTHCHECK_URL: /200.html
86-
$ deis config:set HEALTHCHECK_INITIAL_DELAY=5
87-
=== peachy-waxworks
88-
HEALTHCHECK_INITIAL_DELAY: 5
89-
HEALTHCHECK_URL: /200.html
90-
$ deis config:set HEALTHCHECK_TIMEOUT=5
91-
=== peachy-waxworks
92-
HEALTHCHECK_TIMEOUT: 5
93-
HEALTHCHECK_INITIAL_DELAY: 5
94-
HEALTHCHECK_URL: /200.html
95-
$ deis config:set HEALTHCHECK_PORT=5000
96-
=== peachy-waxworks
97-
HEALTHCHECK_TIMEOUT: 5
98-
HEALTHCHECK_INITIAL_DELAY: 5
99-
HEALTHCHECK_URL: /200.html
100-
HEALTHCHECK_PORT: 5000
101-
102-
If a new release does not pass the healthcheck, the application will be rolled back to the previous
103-
release. Beyond that, if an application container responds to a heartbeat check with a different
104-
status than a 200-399, the [router][] will mark that container as down and stop sending
105-
requests to that container.
106-
107-
The health checks are provided by [kubernetes health checks][]. Currently only HTTP GET is supported.
80+
By default, Workflow only checks that your application containers start in
81+
their Pod. If you would like Kubernetes to respond to appliation health, you
82+
may add a health check by configuring URL, port, initial delay, and timeout
83+
values. The health checks are implemented as [Kubernetes container probes][kubernetes-probes].
84+
85+
* `HEALTHCHECK_URL`: the URL to visit for the health check (String, Default: `/`)
86+
* `HEALTHCHECK_PORT`: the TCP port to use for the health check (Integer, Default: `80` or `5000`)
87+
* `HEALTHCHECK_INITIAL_DELAY`: number of seconds to wait before sending health checks (Integer, Default: `50`)
88+
* `HEALTHCHECK_TIMEOUT`: number of seconds to wait before assuming the application is unhealthy (Integer, Default: `50`)
89+
90+
Configure these health checks on a per-application basis using `deis config:set`:
91+
```
92+
$ deis config:set HEALTHCHECK_URL=/200.html
93+
=== peachy-waxworks
94+
HEALTHCHECK_URL: /200.html
95+
$ deis config:set HEALTHCHECK_INITIAL_DELAY=5
96+
=== peachy-waxworks
97+
HEALTHCHECK_INITIAL_DELAY: 5
98+
HEALTHCHECK_URL: /200.html
99+
$ deis config:set HEALTHCHECK_TIMEOUT=5
100+
=== peachy-waxworks
101+
HEALTHCHECK_TIMEOUT: 5
102+
HEALTHCHECK_INITIAL_DELAY: 5
103+
HEALTHCHECK_URL: /200.html
104+
$ deis config:set HEALTHCHECK_PORT=5000
105+
=== peachy-waxworks
106+
HEALTHCHECK_TIMEOUT: 5
107+
HEALTHCHECK_INITIAL_DELAY: 5
108+
HEALTHCHECK_URL: /200.html
109+
HEALTHCHECK_PORT: 5000
110+
```
111+
112+
Only HTTP-based health checks using the GET method are supported at this time.
113+
114+
If an application times out, or responds to a health check with a response code
115+
outside the 200-399 range, Kubernetes will stop sending requests to the
116+
application and re-schedule the pod to another node.
117+
118+
Configured health checks also modify the default application deploy behavior.
119+
When starting a new pod, Workflow will wait for the health check to pass before
120+
moving onto the next pod.
108121

109122
## Track Changes
110123

@@ -142,4 +155,4 @@ Use `deis rollback` to revert to a previous release.
142155
[stores config in environment variables]: http://12factor.net/config
143156
[release]: ../reference-guide/terms.md#release
144157
[router]: ../understanding-deis/components.md#router
145-
[kubernetes health checks]: http://kubernetes.io/v1.1/docs/user-guide/pod-states.html#container-probes
158+
[kubernetes-probes]: http://kubernetes.io/v1.1/docs/user-guide/pod-states.html#container-probes

0 commit comments

Comments
 (0)