Keepalive

Keepalive option indicates whether SO_KEEPALIVE on the socket should be enabled.

Keepalive configuration

Keepalive configuration can be set for all Emissary mappings in the ambassador Module or set per Mapping.

The keepalive attribute configures keepalive. The following fields are supported:

keepalive:
  idle_time: <integer>
  interval: <integer>
  probes: <integer>

idle_time

(Default: 7200) The number of seconds a connection needs to be idle before keep-alive probes start being sent.

interval

(Default: 75) The number of seconds between keep-alive probes.

probes

(Default: 9) is the maximum number of keepalive probes to send without response before deciding the connection is dead.

Examples

Keepalive probes defined on a single mapping:

---
apiVersion: getambassador.io/v3alpha1
kind:  Mapping
metadata:
  name:  quote-backend
spec:
  prefix: /backend/
  service: quote
  keepalive:
    idle_time: 100
    interval: 10
    probes: 9

A global keepalive configuration:

apiVersion: getambassador.io/v3alpha1
kind:  Module
metadata:
  name:  ambassador
spec:
  config:
    keepalive:
       idle_time: 100
       interval: 10
       probes: 9
---
apiVersion: getambassador.io/v3alpha1
kind:  Mapping
metadata:
  name:  quote-backend
spec:
  prefix: /backend/
  service: quote