diff --git a/Cargo.lock b/Cargo.lock index a005b4b3..95eabfab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2570,6 +2570,7 @@ dependencies = [ "tracing-error", "tracing-futures", "zebra-chain", + "zebra-test", ] [[package]] diff --git a/tower-fallback/src/lib.rs b/tower-fallback/src/lib.rs index 533f4c8a..2ea7ea53 100644 --- a/tower-fallback/src/lib.rs +++ b/tower-fallback/src/lib.rs @@ -1,7 +1,15 @@ -/// A service combinator that sends requests to a first service, then retries -/// processing on a second fallback service if the first service errors. -/// -/// TODO: similar code exists in linkerd and could be upstreamed into tower +//! 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][aws-fallback] 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. +//! +//! [aws-fallback]: https://aws.amazon.com/builders-library/avoiding-fallback-in-distributed-systems/ + pub mod future; mod service;