|
2 | 2 | // * scalability_and_performance/routing-optimization.adoc
|
3 | 3 | // * post_installation_configuration/network-configuration.adoc
|
4 | 4 |
|
5 |
| -:_content-type: Procedure |
| 5 | +:_content-type: CONCEPT |
6 | 6 | [id="router-performance-optimizations_{context}"]
|
7 | 7 | = Ingress Controller (router) performance optimizations
|
8 | 8 |
|
9 | 9 | {product-title} no longer supports modifying Ingress Controller deployments by setting environment variables such as `ROUTER_THREADS`, `ROUTER_DEFAULT_TUNNEL_TIMEOUT`, `ROUTER_DEFAULT_CLIENT_TIMEOUT`, `ROUTER_DEFAULT_SERVER_TIMEOUT`, and `RELOAD_INTERVAL`.
|
10 | 10 |
|
11 | 11 | You can modify the Ingress Controller deployment, but if the Ingress Operator is enabled, the configuration is overwritten.
|
12 |
| - |
13 |
| -== Configuring Ingress Controller liveness, readiness, and startup probes |
14 |
| - |
15 |
| -Cluster administrators can configure the timeout values for the kubelet's liveness, readiness, and startup probes for router deployments that are managed by the {product-title} Ingress Controller (router). The liveness and readiness probes of the router use the default timeout value |
16 |
| -of 1 second, which is too short for the kubelet's probes to succeed in some scenarios. Probe timeouts can cause unwanted router restarts that interrupt application connections. The ability to set larger timeout values can reduce the risk of unnecessary and unwanted restarts. |
17 |
| - |
18 |
| -You can update the `timeoutSeconds` value on the `livenessProbe`, `readinessProbe`, and `startupProbe` parameters of the router container. |
19 |
| - |
20 |
| -[cols="3a,8a",options="header"] |
21 |
| -|=== |
22 |
| - |Parameter |Description |
23 |
| - |
24 |
| - |`livenessProbe` |
25 |
| - |The `livenessProbe` reports to the kubelet whether a pod is dead and needs to be restarted. |
26 |
| - |
27 |
| - |`readinessProbe` |
28 |
| - |The `readinessProbe` reports whether a pod is healthy or unhealthy. When the readiness probe reports an unhealthy pod, then the kubelet marks the pod as not ready to accept traffic. Subsequently, the endpoints for that pod are marked as not ready, and this status propogates to the kube-proxy. On cloud platforms with a configured load balancer, the kube-proxy communicates to the cloud load-balancer not to send traffic to the node with that pod. |
29 |
| - |
30 |
| - |`startupProbe` |
31 |
| - |The `startupProbe` gives the router pod up to 2 minutes to initialize before the kubelet begins sending the router liveness and readiness probes. This initialization time can prevent routers with many routes or endpoints from prematurely restarting. |
32 |
| -|=== |
33 |
| - |
34 |
| - |
35 |
| -[IMPORTANT] |
36 |
| -==== |
37 |
| -The timeout configuration option is an advanced tuning technique that can be used to work around issues. However, these issues should eventually be diagnosed and possibly a support case or https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12332330&summary=Summary&issuetype=1&priority=10200&versions=12385624[Jira issue] opened for any issues that causes probes to time out. |
38 |
| -==== |
39 |
| - |
40 |
| -The following example demonstrates how you can directly patch the default router deployment to set a 5-second timeout for the liveness and readiness probes: |
41 |
| - |
42 |
| - |
43 |
| -[source, terminal] |
44 |
| ----- |
45 |
| -$ oc -n openshift-ingress patch deploy/router-default --type=strategic --patch='{"spec":{"template":{"spec":{"containers":[{"name":"router","livenessProbe":{"timeoutSeconds":5},"readinessProbe":{"timeoutSeconds":5}}]}}}}' |
46 |
| ----- |
47 |
| - |
48 |
| -.Verification |
49 |
| -[source, terminal] |
50 |
| ----- |
51 |
| -$ oc -n openshift-ingress describe deploy/router-default | grep -e Liveness: -e Readiness: |
52 |
| - Liveness: http-get http://:1936/healthz delay=0s timeout=5s period=10s #success=1 #failure=3 |
53 |
| - Readiness: http-get http://:1936/healthz/ready delay=0s timeout=5s period=10s #success=1 #failure=3 |
54 |
| ----- |
0 commit comments