-
Notifications
You must be signed in to change notification settings - Fork 282
outbound: Reorganize outbound stacks #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…only defined once
|
this will probably conflict with #658, so whoever merges second is gonna have to figure that out |
| } | ||
|
|
||
| /// Constructs a TCP load balancer. | ||
| pub fn build_tcp_balance<C, E, I>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any actual change here, or did this just move around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just moved to be next to tcp_connect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like some of the parameters were also removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, fallback was extracted from tcp_balance c18b0ae
| fn is_loop(err: &(dyn std::error::Error + 'static)) -> bool { | ||
| err.is::<prevent_loop::LoopPrevented>() || err.source().map(is_loop).unwrap_or(false) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/tioli: is_discovery_rejected has a debug! event in it, should this as well?
| bind: listen::Bind::new(SocketAddr::new(LOCALHOST.into(), 0), None) | ||
| .with_orig_dst_addr(orig_dst.into()), | ||
| h2_settings, | ||
| h2_settings: h2::Settings::default(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this Default impl returns different settings than the actual default values defined in env.rs; IIRC it's derived and these are both None.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These settings don't matter for tests, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it's not a big deal, i just thought it was better for this to match the actual defaults everywhere, so that we don't go to write a test that does depend on some setting and get surprising results. not a blocker though.
| svc::layers() | ||
| .push_failfast(dispatch_timeout) | ||
| .push_spawn_buffer_with_idle_timeout(buffer_capacity, cache_max_idle_age) | ||
| .push(metrics.stack.layer(stack_labels("tcp"))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened to the TCP metrics layer? did that get misplaced, or is it added somewhere else that i'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioned in the PR description
The metrics have been removed from the TCP balancer stack (for now).
These are just stack metrics (for our own debugging, really). Will probably reintroduce this after the caching stops moving around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, yup, i can't read. carry on!
hawkw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
| } | ||
|
|
||
| /// Constructs a TCP load balancer. | ||
| pub fn build_tcp_balance<C, E, I>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like some of the parameters were also removed?
| svc::layers() | ||
| .push_failfast(dispatch_timeout) | ||
| .push_spawn_buffer_with_idle_timeout(buffer_capacity, cache_max_idle_age) | ||
| .push(metrics.stack.layer(stack_labels("tcp"))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, yup, i can't read. carry on!
This release fixes a recent regression in multicluster gateway configurations that would forbid inbound gateway traffic. It also fixes URI normalization for orig-proto-upgrade requests that do not include a `Host` header. --- * http: Simplify stacks and target types (linkerd/linkerd2-proxy#656) * Make SkipDetect more generic as stack::MakeSwitch (linkerd/linkerd2-proxy#657) * introduce tests for isolated services (linkerd/linkerd2-proxy#655) * http: Put normalize_uri back on the stack (linkerd/linkerd2-proxy#659) * inbound: Apply loop detection on the connect stack (linkerd/linkerd2-proxy#660) * tracing: Elide redundant info in tracing contexts (linkerd/linkerd2-proxy#661) * outbound: Reorganize outbound stacks (linkerd/linkerd2-proxy#662) * app: Decouple stacks from listeners (linkerd/linkerd2-proxy#663) * inbound: Split HTTP detection stack from TLS (linkerd/linkerd2-proxy#664) * integration: Bundle tests in src (linkerd/linkerd2-proxy#665)
This release fixes a recent regression in multicluster gateway configurations that would forbid inbound gateway traffic. It also fixes URI normalization for orig-proto-upgrade requests that do not include a `Host` header. --- * http: Simplify stacks and target types (linkerd/linkerd2-proxy#656) * Make SkipDetect more generic as stack::MakeSwitch (linkerd/linkerd2-proxy#657) * introduce tests for isolated services (linkerd/linkerd2-proxy#655) * http: Put normalize_uri back on the stack (linkerd/linkerd2-proxy#659) * inbound: Apply loop detection on the connect stack (linkerd/linkerd2-proxy#660) * tracing: Elide redundant info in tracing contexts (linkerd/linkerd2-proxy#661) * outbound: Reorganize outbound stacks (linkerd/linkerd2-proxy#662) * app: Decouple stacks from listeners (linkerd/linkerd2-proxy#663) * inbound: Split HTTP detection stack from TLS (linkerd/linkerd2-proxy#664) * integration: Bundle tests in src (linkerd/linkerd2-proxy#665)
There's no functional change here, just some general cleanup
after recent changes, including:
forwarding. This makes the server responsible for all TCP
forwarding. The metrics have been removed from the TCP
balancer stack (for now).
the accept stack.
tcp::Forwardno longer has a maker.OnReponsedoesthe job just fine.