#tower-service #tower #batch #fallback #error #first #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

13 releases

0.2.41-beta.13 May 7, 2024
0.2.41-beta.11 Feb 24, 2024
0.2.41-beta.8 Dec 12, 2023
0.2.41-beta.7 Nov 7, 2023
0.2.41-beta.4 Jul 22, 2023

#229 in Asynchronous

Download history 2/week @ 2024-02-16 175/week @ 2024-02-23 31/week @ 2024-03-01 37/week @ 2024-03-08 38/week @ 2024-03-15 3/week @ 2024-03-22 23/week @ 2024-03-29 7/week @ 2024-04-05 210/week @ 2024-04-12 27/week @ 2024-04-19 9/week @ 2024-04-26 139/week @ 2024-05-03 28/week @ 2024-05-10 18/week @ 2024-05-17

198 downloads per month
Used in 5 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–1.7MB
~32K SLoC