From 6e3bfaefade6c5ed94a58b92c13047efa87f22fb Mon Sep 17 00:00:00 2001 From: Martin Matusiak Date: Thu, 9 Jul 2020 13:17:00 +1000 Subject: [PATCH] docs: fix grammar in outlier detection doc Fixes grammar errors and does minor rephrasing to improve how the Outlier detection architecture doc reads. Signed-off-by: Martin Matusiak Signed-off-by: Greg Greenway --- .../intro/arch_overview/upstream/outlier.rst | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/root/intro/arch_overview/upstream/outlier.rst b/docs/root/intro/arch_overview/upstream/outlier.rst index d8f35540513a4..fd9dc7158a744 100644 --- a/docs/root/intro/arch_overview/upstream/outlier.rst +++ b/docs/root/intro/arch_overview/upstream/outlier.rst @@ -10,35 +10,35 @@ such as consecutive failures, temporal success rate, temporal latency, etc. Outl form of *passive* health checking. Envoy also supports :ref:`active health checking `. *Passive* and *active* health checking can be enabled together or independently, and form the basis for an overall upstream health checking solution. -Outlier detection is part of :ref:`cluster configuration ` -and it needs filters to report errors, timeouts, resets. Currently the following filters support +Outlier detection is part of the :ref:`cluster configuration ` +and it needs filters to report errors, timeouts, and resets. Currently, the following filters support outlier detection: :ref:`http router `, :ref:`tcp proxy ` and :ref:`redis proxy `. Detected errors fall into two categories: externally and locally originated errors. Externally generated errors -are transaction specific and occur on the upstream server in response to the received request. For example, HTTP server returning error code 500 or redis server returning payload which cannot be decoded. Those errors are generated on the upstream host after Envoy has successfully connected to it. -Locally originated errors are generated by Envoy in response to an event which interrupted or prevented communication with the upstream host. Examples of locally originated errors are timeout, TCP reset, inability to connect to a specified port, etc. +are transaction specific and occur on the upstream server in response to the received request. For example, an HTTP server returning error code 500 or a redis server returning a payload which cannot be decoded. Those errors are generated on the upstream host after Envoy has connected to it successfully. +Locally originated errors are generated by Envoy in response to an event which interrupted or prevented communication with the upstream host. Examples of locally originated errors are timeout, TCP reset, inability to connect to a specified port, etc. -Type of detected errors depends on filter type. :ref:`http router ` filter for example +The type of detected errors depends on the filter type. The :ref:`http router ` filter, for example, detects locally originated errors (timeouts, resets - errors related to connection to upstream host) and because it -also understands HTTP protocol it reports -errors returned by HTTP server (externally generated errors). In such scenario, even when connection to upstream HTTP server is successful, -transaction with the server may fail. -On the contrary, :ref:`tcp proxy ` filter does not understand any protocol above -TCP layer and reports only locally originated errors. - -In default configuration (:ref:`outlier_detection.split_external_local_origin_errors` is *false*) -locally originated errors are not distinguished from externally generated (transaction) errors and all end up -in the same bucket and are compared against +also understands the HTTP protocol it reports +errors returned by the HTTP server (externally generated errors). In such a scenario, even when the connection to the upstream HTTP server is successful, +the transaction with the server may fail. +By contrast, the :ref:`tcp proxy ` filter does not understand any protocol above +the TCP layer and reports only locally originated errors. + +Under the default configuration (:ref:`outlier_detection.split_external_local_origin_errors` is *false*) +locally originated errors are not distinguished from externally generated (transaction) errors, all end up +in the same bucket, and are compared against the :ref:`outlier_detection.consecutive_5xx`, :ref:`outlier_detection.consecutive_gateway_failure` and :ref:`outlier_detection.success_rate_stdev_factor` configuration items. For example, if connection to an upstream HTTP server fails twice because of timeout and -then, after successful connection, the server returns error code 500, the total error count will be 3. +then, after successful connection establishment, the server returns error code 500 then the total error count will be 3. Outlier detection may also be configured to distinguish locally originated errors from externally originated (transaction) errors. -It is done via -:ref:`outlier_detection.split_external_local_origin_errors` configuration item. +It is done via the +:ref:`outlier_detection.split_external_local_origin_errors` configuration item. In that mode locally originated errors are tracked by separate counters than externally originated (transaction) errors and the outlier detector may be configured to react to locally originated errors and ignore externally originated errors @@ -46,7 +46,7 @@ or vice-versa. It is important to understand that a cluster may be shared among several filter chains. If one filter chain ejects a host based on its outlier detection type, other filter chains will be also affected even though their -outlier detection type would not eject that host. +outlier detection type would not have ejected that host. Ejection algorithm ------------------ @@ -79,16 +79,16 @@ Envoy supports the following outlier detection types: Consecutive 5xx ^^^^^^^^^^^^^^^ -In default mode (:ref:`outlier_detection.split_external_local_origin_errors` is *false*) this detection type takes into account all generated errors: locally -originated and externally originated (transaction) type of errors. +In the default mode (:ref:`outlier_detection.split_external_local_origin_errors` is *false*) this detection type takes into account all generated errors: locally +originated and externally originated (transaction) errors. Errors generated by non-HTTP filters, like :ref:`tcp proxy ` or :ref:`redis proxy ` are internally mapped to HTTP 5xx codes and treated as such. -In split mode (:ref:`outlier_detection.split_external_local_origin_errors` is *true*) this detection type takes into account only externally originated (transaction) errors ignoring locally originated errors. -If an upstream host is HTTP-server, only 5xx types of error are taken into account (see :ref:`Consecutive Gateway Failure` for exceptions). +In split mode (:ref:`outlier_detection.split_external_local_origin_errors` is *true*) this detection type takes into account only externally originated (transaction) errors, ignoring locally originated errors. +If an upstream host is an HTTP-server, only 5xx types of error are taken into account (see :ref:`Consecutive Gateway Failure` for exceptions). For redis servers, served via :ref:`redis proxy ` only malformed responses from the server are taken into account. -Properly formatted responses, even when they carry operational error (like index not found, access denied) are not taken into account. +Properly formatted responses, even when they carry an operational error (like index not found, access denied) are not taken into account. If an upstream host returns some number of errors which are treated as consecutive 5xx type errors, it will be ejected. The number of consecutive 5xx required for ejection is controlled by @@ -99,8 +99,8 @@ the :ref:`outlier_detection.consecutive_5xx`. +This detection type takes into account a subset of 5xx errors, called "gateway errors" (502, 503 or 504 status code) +and is supported only by the :ref:`http router `. If an upstream host returns some number of consecutive "gateway errors" (502, 503 or 504 status code), it will be ejected. @@ -123,8 +123,8 @@ This detection type is supported by :ref:`http router ` value. Moreover, detection will not be performed for a cluster if the number of hosts @@ -132,8 +132,8 @@ with the minimum required request volume in an interval is less than the :ref:`outlier_detection.success_rate_minimum_hosts` value. -In default configuration mode (:ref:`outlier_detection.split_external_local_origin_errors` is *false*) -this detection type takes into account all type of errors: locally and externally originated. +In the default configuration mode (:ref:`outlier_detection.split_external_local_origin_errors` is *false*) +this detection type takes into account all types of errors: locally and externally originated. The :ref:`outlier_detection.enforcing_local_origin_success` config item is ignored. In split mode (:ref:`outlier_detection.split_external_local_origin_errors` is *true*), @@ -150,15 +150,15 @@ to externally originated errors only and :ref:`outlier_detection.enforcing_local Failure Percentage ^^^^^^^^^^^^^^^^^^ -Failure Percentage based outlier ejection functions similarly to the success rate detecion type, in +Failure Percentage based outlier detection functions similarly to success rate detection, in that it relies on success rate data from each host in a cluster. However, rather than compare those values to the mean success rate of the cluster as a whole, they are compared to a flat user-configured threshold. This threshold is configured via the :ref:`outlier_detection.failure_percentage_threshold` field. -The other configuration fields for failure percentage based ejection are similar to the fields for -success rate ejection. Failure percentage based ejection also obeys +The other configuration fields for failure percentage based detection are similar to the fields for +success rate detection. Failure percentage based detection also obeys :ref:`outlier_detection.split_external_local_origin_errors`; the enforcement percentages for externally- and locally-originated errors are controlled by :ref:`outlier_detection.enforcing_failure_percentage`