#tower-service #tower #error #fallback #combinator #batch #retries

tower-fallback

A Tower service combinator that sends requests to a first service, then retries processing on a second fallback service if the first service errors

17 releases

new 0.2.41-beta.19 Dec 7, 2024
0.2.41-beta.18 Oct 30, 2024
0.2.41-beta.15 Aug 28, 2024
0.2.41-beta.14 Jul 2, 2024
0.2.41-beta.4 Jul 22, 2023

#321 in Asynchronous

Download history 4/week @ 2024-08-16 130/week @ 2024-08-23 41/week @ 2024-08-30 8/week @ 2024-09-06 31/week @ 2024-09-13 39/week @ 2024-09-20 29/week @ 2024-09-27 9/week @ 2024-10-04 1/week @ 2024-10-11 6/week @ 2024-10-18 114/week @ 2024-10-25 38/week @ 2024-11-01 5/week @ 2024-11-08 17/week @ 2024-11-15 19/week @ 2024-11-22 19/week @ 2024-11-29

64 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

11KB
197 lines

A service combinator that sends requests to a first service, then retries processing on a second fallback service if the first service errors.

Fallback designs have a number of downsides but may be useful in some cases. For instance, when using batch verification, the Fallback wrapper can be used to fall back to individual verification of each item when a batch fails to verify.

TODO: compare with similar code in linkerd.

Dependencies

~1–1.6MB
~29K SLoC