docs: add retry plugin arch docs and remove not-implemented-hide#4592
Merged
mattklein123 merged 5 commits intoenvoyproxy:masterfrom Oct 3, 2018
Merged
docs: add retry plugin arch docs and remove not-implemented-hide#4592mattklein123 merged 5 commits intoenvoyproxy:masterfrom
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
Conversation
added 4 commits
October 2, 2018 17:41
Signed-off-by: Snow Pettersen <snowp@squareup.com>
Signed-off-by: Snow Pettersen <snowp@squareup.com>
Signed-off-by: Snow Pettersen <snowp@squareup.com>
Signed-off-by: Snow Pettersen <snowp@squareup.com>
mattklein123
requested changes
Oct 3, 2018
Member
mattklein123
left a comment
There was a problem hiding this comment.
Thanks this is great. Some small nits.
| * **Retry conditions**: Envoy can retry on different types of conditions depending on application | ||
| requirements. For example, network failure, all 5xx response codes, idempotent 4xx response codes, | ||
| etc. | ||
| **Host selection retry plugins**: Envoy can be configured to apply additional logic to the host selection logic when selecting hosts for retries. Specifying a :ref:`retry host predicate <envoy_api_field_route.RouteAction.RetryPolicy.retry_host_predicate>` allows for reattempting host selection when certain hosts are selected (e.g. when an already attempted host is selected), while a :ref:`retry prioririty <envoy_api_field_route.RouteAction.RetryPolicy.retry_priority>` can be configured to adjust the priority load used when selecting a priority for retries. |
Member
There was a problem hiding this comment.
nit: can you wrap to ~100 col? Same in the other file?
| Normally during retries, hosts selected for retry attempts will be selected the same way the initial request is selected. To modify this behavior retry plugins can be used, which fall into two categories: | ||
|
|
||
| * :ref:`**Retry host predicate** <envoy_api_field_route.RouteAction.RetryPolicy.retry_host_predicate>`. These can be used to "reject" a host, which will cause host selection to be reattempted. If one or more predicates have been configured, host selection will continue until either the host predicates accept the host or a configurable :ref:`max attempts <envoy_api_field_route.RouteAction.RetryPolicy.host_selection_retry_max_attempts>` has been reached. Any number of these predicates can be specified, and the host will be rejected if any of the predicates reject the host. | ||
| * :ref:`**Retry priority** <envoy_api_field_route.RouteAction.RetryPolicy.retry_priority>`. These can be used to adjust the priority load used when selecting a priorirty for a retry attempt. Only one such plugin may be specified. |
|
|
||
| For example, to configure retries to prefer hosts that haven't been attempted already, the builtin `envoy.retry_host_predicates.other_hosts` predicate can be used: | ||
|
|
||
| .. code-block:: none |
|
|
||
| This will keep track of previously attempted priorities, and adjust the priority load such that other priorites will be targeted in subsequent retry attempts. The `update_frequency` parameter decides how often the priority load should be recalculated. | ||
|
|
||
| These plugins can be comined, which will exclude both previously attempted hosts as well as previously attempted priorities. |
Signed-off-by: Snow Pettersen <snowp@squareup.com>
aa-stripe
pushed a commit
to aa-stripe/envoy
that referenced
this pull request
Oct 11, 2018
…oyproxy#4592) Signed-off-by: Snow Pettersen <snowp@squareup.com> Signed-off-by: Aaltan Ahmad <aa@stripe.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds arch documentation that explains how retry plugins works and how to configure them. References a plugin added in #4529, so merging this should probably wait until that lands.
Risk Level: Low
Fixes #4544