Skip to content
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

Add a NewServeHttp::layer helper #793

Merged
merged 3 commits into from Dec 28, 2020
Merged

Add a NewServeHttp::layer helper #793

merged 3 commits into from Dec 28, 2020

Conversation

olix0r
Copy link
Member

@olix0r olix0r commented Dec 24, 2020

Now that NewServeHttp takes a single inner stack, we can instrument as
a simple layer.

This change replaces the modules' constructor with a layer and
consolidates the inbound HTTP server stack.

Now that `NewServeHttp` takes a single inner stack, we can instrument as
a simple layer.

This change replaces the modules' constructor with a layer and
consolidates the inbound HTTP server stack.
@olix0r olix0r requested a review from a team December 24, 2020 23:19
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, seems good!

@@ -349,20 +349,29 @@ impl Config {
..
} = self.proxy.clone();

// Handles requests as they are initially received by the proxy.
let http_admit_request = svc::layers()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit/tioli: i kind of liked having this factored out, but nbd...

Copy link
Member Author

@olix0r olix0r Dec 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that it was split out helped hide the fact that we had redundant failfast modules -- one in the admit layers and another inside the buffer. It's a bit easier to reason about as one big list...

@olix0r olix0r merged commit ff2fdb2 into main Dec 28, 2020
@olix0r olix0r deleted the ver/http-serve-layer branch December 28, 2020 18:52
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Jan 6, 2021
This release adds a new `/shutdown` admin endpoint that may only be
accessed over the loopback network. This allows batch jobs to gracefully
terminate the proxy on completion. The `linkerd-await` utility can be
used to automate this.

This release also includes ~33 non-user-facing changes, the most
important of which updates the Linkerd Transport Header preface to be
`transport.l5d.io/v1\r\n\r\n`.

---

* Simplify orig_proto::Downgrade intializaiton (linkerd/linkerd2-proxy#796)
* Remove unused make_response module (linkerd/linkerd2-proxy#792)
* Add MakeNormalizeUri::layer helper (linkerd/linkerd2-proxy#794)
* Simplify tcp::Forward stack initialization (linkerd/linkerd2-proxy#797)
* Add a NewServeHttp::layer helper (linkerd/linkerd2-proxy#793)
* Simplify outbound endpoint stakc creation (linkerd/linkerd2-proxy#798)
* Simplify NewRouter initialization (linkerd/linkerd2-proxy#795)
* Remove unused http::add_header module (linkerd/linkerd2-proxy#800)
* Simplify concurrency-limit initialization (linkerd/linkerd2-proxy#799)
* Remove the strip_header::Layer type (linkerd/linkerd2-proxy#801)
* Simplify http-classify stack initialization (linkerd/linkerd2-proxy#804)
* Simplify HTTP metrics initialization (linkerd/linkerd2-proxy#806)
* Add checks to ensure support for opaque transport (linkerd/linkerd2-proxy#808)
* Remove the override_authority::Layer type (linkerd/linkerd2-proxy#802)
* Simplify tls::client module (linkerd/linkerd2-proxy#809)
* Simplify header_from_target stack initialization (linkerd/linkerd2-proxy#803)
* Cleanup HTTP boxing modules (linkerd/linkerd2-proxy#805)
* Include scope names in failfast error messages (linkerd/linkerd2-proxy#791)
* Simplify drain module implementation (linkerd/linkerd2-proxy#810)
* Simplify BoxNewService initialization (linkerd/linkerd2-proxy#807)
* admin: Add a /shutdown endpoint (linkerd/linkerd2-proxy#811)
* stack: Remove the MakeReady helper (linkerd/linkerd2-proxy#813)
* Remove the stack::Oneshot helper (linkerd/linkerd2-proxy#812)
* http: Simplify http::boxed type references (linkerd/linkerd2-proxy#814)
* Simplify stack type constraints (linkerd/linkerd2-proxy#815)
* Rename transport types to ConnectTcp and BindTcp (linkerd/linkerd2-proxy#819)
* Remove box from inbound connector (linkerd/linkerd2-proxy#816)
* tap: Simplify tap initialization (linkerd/linkerd2-proxy#820)
* Update Rust to 1.49.0 (linkerd/linkerd2-proxy#822)
* Avoid boxing I/O types for optional TLS (linkerd/linkerd2-proxy#817)
* Decouple TLS detection from TCP connections (linkerd/linkerd2-proxy#818)
* stack: Rename NewOptional to NewUnwrapOr (linkerd/linkerd2-proxy#824)
* inbound: Decouple inbound stack from TCP connections (linkerd/linkerd2-proxy#823)
* Rename opaque-transport to transport-header (linkerd/linkerd2-proxy#825)
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Jan 6, 2021
This release adds a new `/shutdown` admin endpoint that may only be
accessed over the loopback network. This allows batch jobs to gracefully
terminate the proxy on completion. The `linkerd-await` utility can be
used to automate this.

This release also includes ~33 non-user-facing changes, the most
important of which updates the Linkerd Transport Header preface to be
`transport.l5d.io/v1\r\n\r\n`.

---

* Simplify orig_proto::Downgrade intializaiton (linkerd/linkerd2-proxy#796)
* Remove unused make_response module (linkerd/linkerd2-proxy#792)
* Add MakeNormalizeUri::layer helper (linkerd/linkerd2-proxy#794)
* Simplify tcp::Forward stack initialization (linkerd/linkerd2-proxy#797)
* Add a NewServeHttp::layer helper (linkerd/linkerd2-proxy#793)
* Simplify outbound endpoint stakc creation (linkerd/linkerd2-proxy#798)
* Simplify NewRouter initialization (linkerd/linkerd2-proxy#795)
* Remove unused http::add_header module (linkerd/linkerd2-proxy#800)
* Simplify concurrency-limit initialization (linkerd/linkerd2-proxy#799)
* Remove the strip_header::Layer type (linkerd/linkerd2-proxy#801)
* Simplify http-classify stack initialization (linkerd/linkerd2-proxy#804)
* Simplify HTTP metrics initialization (linkerd/linkerd2-proxy#806)
* Add checks to ensure support for opaque transport (linkerd/linkerd2-proxy#808)
* Remove the override_authority::Layer type (linkerd/linkerd2-proxy#802)
* Simplify tls::client module (linkerd/linkerd2-proxy#809)
* Simplify header_from_target stack initialization (linkerd/linkerd2-proxy#803)
* Cleanup HTTP boxing modules (linkerd/linkerd2-proxy#805)
* Include scope names in failfast error messages (linkerd/linkerd2-proxy#791)
* Simplify drain module implementation (linkerd/linkerd2-proxy#810)
* Simplify BoxNewService initialization (linkerd/linkerd2-proxy#807)
* admin: Add a /shutdown endpoint (linkerd/linkerd2-proxy#811)
* stack: Remove the MakeReady helper (linkerd/linkerd2-proxy#813)
* Remove the stack::Oneshot helper (linkerd/linkerd2-proxy#812)
* http: Simplify http::boxed type references (linkerd/linkerd2-proxy#814)
* Simplify stack type constraints (linkerd/linkerd2-proxy#815)
* Rename transport types to ConnectTcp and BindTcp (linkerd/linkerd2-proxy#819)
* Remove box from inbound connector (linkerd/linkerd2-proxy#816)
* tap: Simplify tap initialization (linkerd/linkerd2-proxy#820)
* Update Rust to 1.49.0 (linkerd/linkerd2-proxy#822)
* Avoid boxing I/O types for optional TLS (linkerd/linkerd2-proxy#817)
* Decouple TLS detection from TCP connections (linkerd/linkerd2-proxy#818)
* stack: Rename NewOptional to NewUnwrapOr (linkerd/linkerd2-proxy#824)
* inbound: Decouple inbound stack from TCP connections (linkerd/linkerd2-proxy#823)
* Rename opaque-transport to transport-header (linkerd/linkerd2-proxy#825)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants