#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

18 releases

0.2.41-beta.21 Feb 4, 2025
0.2.41-beta.19 Dec 7, 2024
0.2.41-beta.18 Oct 30, 2024
0.2.41-beta.14 Jul 2, 2024
0.2.41-beta.4 Jul 22, 2023

#393 in Asynchronous

Download history 4/week @ 2024-10-23 145/week @ 2024-10-30 10/week @ 2024-11-06 11/week @ 2024-11-13 22/week @ 2024-11-20 18/week @ 2024-11-27 156/week @ 2024-12-04 45/week @ 2024-12-11 20/week @ 2024-12-18 11/week @ 2025-01-01 12/week @ 2025-01-08 1/week @ 2025-01-15 13/week @ 2025-01-22 51/week @ 2025-01-29 100/week @ 2025-02-05

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

MIT/Apache

12KB
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.5MB
~28K SLoC