This extension of the specification defines a service replica's liveness and readiness and how a service should communicate both.
Liveness is an indicator of the service replica's process state. It is intended to indicate whether a process has reached an unresponsive state and needs to be restarted. A product must include a liveness HTTPS endpoint that adheres to the following:
GET
endpoint./status/liveness
relative to the service's configured sls-status endpoint200 OK
should be used.Readiness is an indicator of a service replica's ability to respond to network requests and will influence whether the replica should accept traffic destined for its service. A product must include a readiness HTTPS endpoint that adheres to the following:
GET
endpoint./status/readiness
relative to the service's configured sls-status endpoint.200 OK
should be used.If a replica indicates it is not ready, no network traffic will be routed to it. To receive network traffic, either:
allow-traffic-when-not-ready
extension in its manifest (see example below). In this case, Kubernetes traffic routing will disregard readiness and node endpoints will be routable even if a pod is not available.Services may have their replicas receive traffic before becoming ready by declaring the all-traffic-when-not-ready
manifest extension:
Copied!1 2
extensions: allow-traffic-when-not-ready: true