docker-flink / examples

Examples for how to use the Flink Docker images in a variety of ways
Apache License 2.0
90 stars 46 forks source link

Job manager Liveliness prob #6

Closed Vince-Cercury closed 6 years ago

Vince-Cercury commented 6 years ago

livenessProbe: httpGet: path: /overview port: 8081 initialDelaySeconds: 30 periodSeconds: 10

A livelinessProbe is important, especially in HA. We want to make sure the Job Manager was elected as a leader. Sometimes I observed it getting stuck if the Job manager start before the Zookeeper cluster is up and running. It hangs waiting for Zookeeper to elect a leader and never completes. This livenessProbe has fixed that issue.

If the job manager cannot see a leader, it will return an error, which will get captured by the livenessProbe. Kubernetes will eventually restart the container

Vince-Cercury commented 6 years ago

PR: https://github.com/docker-flink/examples/pull/8

patricklucas commented 6 years ago

Fixed #8