Skip to content

Commit 2a1562c

Browse files
authored
update docs for zero-downtime deployments (#472)
1 parent c152877 commit 2a1562c

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

docs/docs/20230619-startup-shutdown-zero-downtime-deployments.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This document explains the details of API service startup and shutdown behavior,
2121
- Configure your orchestration tooling to route traffic to the service only if and when `/readyz` is positive!
2222
- On shutdown:
2323
- `/readyz` returns a negative result
24-
- Wait a little and drain all requests
24+
- Wait a little and drain all requests (by default, 30 sec -- make sure your orchestration graceful shutdown period is greater than that (i.e. set to 60 sec))
2525
- Stop the webserver, and stop the program
2626
- See also: https://kubernetes.io/docs/reference/using-api/health-checks/
2727

@@ -84,25 +84,28 @@ At this point, the pod is operational and can service traffic.
8484
```yaml
8585
metadata:
8686
name: boost-relay-api-proposer
87-
+ annotations:
88-
+ alb.ingress.kubernetes.io/healthcheck-interval-seconds: 10
89-
+ alb.ingress.kubernetes.io/healthcheck-path: /readyz
90-
+ alb.ingress.kubernetes.io/healthcheck-port: 8080
87+
annotations:
88+
alb.ingress.kubernetes.io/healthcheck-interval-seconds: "10"
89+
alb.ingress.kubernetes.io/healthcheck-path: /readyz
90+
alb.ingress.kubernetes.io/healthcheck-port: "8080"
9191
spec:
9292
template:
9393
spec:
94+
terminationGracePeriodSeconds: 60
9495
containers:
9596
- name: boost-relay-api-proposer
96-
+ livenessProbe:
97-
+ httpGet:
98-
+ path: /livez
99-
+ port: 8080
100-
+ initialDelaySeconds: 5
101-
+ readinessProbe:
102-
+ httpGet:
103-
+ path: /readyz
104-
+ port: 8080
105-
+ initialDelaySeconds: 30
97+
livenessProbe:
98+
initialDelaySeconds: 5
99+
failureThreshold: 2
100+
httpGet:
101+
path: /livez
102+
port: 8080
103+
readinessProbe:
104+
initialDelaySeconds: 5
105+
failureThreshold: 2
106+
httpGet:
107+
path: /readyz
108+
port: 8080
106109
```
107110
108111
---

0 commit comments

Comments
 (0)