Skip to content

Commit 8d9c8df

Browse files
authored
ingress: Add failfast to the forwarder (#1035)
The ingress-mode proxy's forwarding stack--used when a request does not set the `l5d-dst-override` header--has no failfast implemetation. This means that when a connection can't be obtained for the endpoint, requests are buffered indefinitely. This change adds a failfast layer so that these requests are failed eagerly after 3s of unavailability, causing the serverside connection to be dropped (so that the application client may re-resolve the endpoint). This is really a temporary solution. We should probably avoid implementing reconnection at all in this case so that connection errors can be used in place of failfast errors. Related to linkerd/linkerd2#6184
1 parent 1223447 commit 8d9c8df

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

linkerd/app/outbound/src/ingress.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ impl Outbound<svc::BoxNewHttp<http::Endpoint>> {
168168
})),
169169
},
170170
http_endpoint
171+
.push_on_response(
172+
svc::layers()
173+
.push(svc::layer::mk(svc::SpawnReady::new))
174+
.push(svc::FailFast::layer("Ingress server", dispatch_timeout)),
175+
)
171176
.instrument(|_: &_| info_span!("forward"))
172177
.into_inner(),
173178
)

0 commit comments

Comments
 (0)