From eae6dd4cfd6b6c7a8756cfe09942178a2f3e68b6 Mon Sep 17 00:00:00 2001 From: Akshay Narayan Date: Mon, 23 Mar 2020 18:06:24 -0400 Subject: [PATCH] Mention tower-buffer output-queued service pattern in Steer --- tower-steer/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tower-steer/src/lib.rs b/tower-steer/src/lib.rs index ad13b481e..2f3d951d4 100644 --- a/tower-steer/src/lib.rs +++ b/tower-steer/src/lib.rs @@ -84,7 +84,9 @@ where /// Note that `Steer` must wait for all services to be ready since it can't know ahead of time /// which `Service` the next message will arrive for, and is unwilling to buffer items /// indefinitely. This will cause head-of-line blocking unless paired with a `Service` that does -/// buffer items indefinitely, and thus always returns `Poll::Ready`. +/// buffer items indefinitely, and thus always returns `Poll::Ready`. For example, wrapping each +/// component service with a `tower-buffer` with a high enough limit (the maximum number of +/// concurrent requests) will prevent head-of-line blocking in `Steer`. #[derive(Debug)] pub struct Steer { router: F,