Skip to content

docs: add retry plugin arch docs and remove not-implemented-hide#4592

Merged
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
snowp:implemented-retry
Oct 3, 2018
Merged

docs: add retry plugin arch docs and remove not-implemented-hide#4592
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
snowp:implemented-retry

Conversation

@snowp
Copy link
Contributor

@snowp snowp commented Oct 3, 2018

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

Snow Pettersen 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>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo priorirty


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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yaml? Same below.


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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "comined"

Signed-off-by: Snow Pettersen <snowp@squareup.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mattklein123 mattklein123 merged commit 3e2eff4 into envoyproxy:master Oct 3, 2018
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants