Commit Graph

63 Commits

Author SHA1 Message Date
Oliver Gould 13c3aa9062
proxy: v2.124.0 (#5323)
This release updates the proxy's `*ring*` dependency to pick up the
latest changes from BoringSSL.

Additionally, we've audited uses of non-cryptographic random number
generators in the proxy to ensure that each balancer/router intializes
its own RNG state.

---

* Audit uses of SmallRng (linkerd/linkerd2-proxy#757)
* Update *ring* to 0.6.19 (linkerd/linkerd2-proxy#758)
* metrics: Support the Summary metric type (linkerd/linkerd2-proxy#756)
2020-12-03 11:28:23 -08:00
Oliver Gould 83241fef20
proxy: v2.123.0 (#5301)
This release removes a potential panic: it was assumed that looking up a
socket's peer address was infallible, but in practice this call can
fail when a host is under high load. Now these failures only impact the
connection-level task and not the whole proxy proces.

Also, the `process_cpu_seconds_total` metric is now exposed as a float
so that its value may include fractional seconds with 10ms granularity.

---

* io: Make peer_addr fallible (linkerd/linkerd2-proxy#755)
* metrics: Expose process_cpu_seconds_total as a float (linkerd/linkerd2-proxy#754)
2020-11-30 17:14:03 -08:00
Oliver Gould e78cb0d445
proxy: v2.122.0 (#5279)
This release addresses some issues reported around clients seeing
max-concurrency errors by increasing the default in-flight request limit
to 100K pending requests.

Additionally, the proxy now sets an appropriate content-type when
synthesizing gRPC error responses.

---

* style: fix some random clippy lints (linkerd/linkerd2-proxy#749)
* errors: Set `content-type` for synthesized grpc errors (linkerd/linkerd2-proxy#750)
* concurrency-limit: Drop permit on readiness (linkerd/linkerd2-proxy#751)
* Increase the default buffer capacity to 100K (linkerd/linkerd2-proxy#752)
* Change default max-in-flight and buffer-capacity (linkerd/linkerd2-proxy#753)
2020-11-24 09:14:44 -08:00
Oliver Gould 375ffd782f
proxy: v2.121.0 (#5253)
This release changes error handling to teardown the server-side
connection when an unexpected error is encountered.

Additionally, the outbound TCP routing stack can now skip redundant
service discovery lookups when profile responses include endpoint
information.

Finally, the cache implementation has been updated to reduce latency by
removing unnecessary buffers.

---

* h2: enable HTTP/2 keepalive PING frames (linkerd/linkerd2-proxy#737)
* actions: Add timeouts to GitHub actions (linkerd/linkerd2-proxy#738)
* outbound: Skip endpoint resolution on profile hint (linkerd/linkerd2-proxy#736)
* Add a FromStr for dns::Name (linkerd/linkerd2-proxy#746)
* outbound: Avoid redundant TCP endpoint resolution (linkerd/linkerd2-proxy#742)
* cache: Make the cache cloneable with RwLock (linkerd/linkerd2-proxy#743)
* http: Teardown serverside connections on error (linkerd/linkerd2-proxy#747)
2020-11-18 16:55:53 -08:00
Oliver Gould 7010138d72
proxy: v2.119.0 (#5200)
This release modifies the default idle timeout to 5s for outbound
clients and 20s for inbound clients. This prevents idle clients from
consuming memory at the cost of performing more discovery resolutions
for periodic but infrequent traffic. This is intended to reduce the
proxy's memory footprint, especially on Prometheus instances.

The proxy's *ring* and rustls dependencies have also been updated.

---

* Update *ring* and rustls dependencies (linkerd/linkerd2-proxy#735)
* http: Configure client connection pools (linkerd/linkerd2-proxy#734)
2020-11-10 09:29:38 -08:00
Oliver Gould 8540cd617d
proxy: v2.118.0 (#5168)
This release adds support for the LINKERD2_PROXY_CORES environment
variable. When set, the value may limit the proxy's runtime resources
so that it does not allocate a thread per core available from the host
operating system.

---

* inbound: use MakeSwitch for loopback (linkerd/linkerd2-proxy#729)
* buffer: Remove readiness watch (linkerd/linkerd2-proxy#731)
* Allow specifying the number of available cores via the env (linkerd/linkerd2-proxy#733)
2020-11-02 16:36:52 -08:00
Oliver Gould 1f9433209f
proxy: v2.117.0 (#5137)
This release adds an 'ingress mode' to support per-request routing for
HTTP ingresses.

Additionally, the performance impact of logging should be reduced,
especially when the proxy log level is not set to `debug` or `trace`.

---

* router: Use NewService instead of MakeService (linkerd/linkerd2-proxy#724)
* outbound: Split TCP stack into dedicated modules (linkerd/linkerd2-proxy#725)
* trace: update `tracing-subscriber` to 0.2.14 (linkerd/linkerd2-proxy#726)
* outbound: Extract HTTP and server modules (linkerd/linkerd2-proxy#727)
* outbound: Introduce 'ingress mode' (linkerd/linkerd2-proxy#728)
* Reduce tracing spans to the debug level (linkerd/linkerd2-proxy#730)
2020-10-26 12:09:08 -07:00
Oliver Gould a6f5d72b63
proxy: v2.116.0 (#5102)
This release fixes a minor regression in outbound tap data, where the
source TCP address was omitted.

This release also improves logging:
- uptime formatting is fixed to only display microsecond granularity,
  which fixes formatting/alignment inconsistencies.
- The `off` log level is now special-cased to entirely disable the
  logging subsystem. This can substantially reduce memory usage.

---

* telemetry: Include git SHA in build_info (linkerd/linkerd2-proxy#716)
* outbound: Set source address in Tap metadata (linkerd/linkerd2-proxy#718)
* outbound: test profile search nets filtering (linkerd/linkerd2-proxy#714)
* app: Consolidate metrics types in `core::metrics` (linkerd/linkerd2-proxy#709)
* outbound: test load balancer adding/removing TCP endpoints (linkerd/linkerd2-proxy#717)
* Remove hardcoded list of ports to skip (linkerd/linkerd2-proxy#719)
* admin: Simplify metrics server (linkerd/linkerd2-proxy#720)
* Split tracing init & admin handlers into crate (linkerd/linkerd2-proxy#721)
* tracing: Fix time formatting to ensure alignment (linkerd/linkerd2-proxy#722)
* tracing: Support disabling tracing entirely (linkerd/linkerd2-proxy#723)
2020-10-20 07:25:32 -07:00
Oliver Gould 5e7e7e6477
proxy: v2.115.0 (#5076)
This release fixes several recent regressions:

1. The proxy could incorrectly emit inbound requests with absolute-form
   URIs.
2. Inbound tap metadata did not include source addresses or identities.
3. Gateway requests included the incorrect port in the
   `l5d-dst-canonical` header.
4. Gateway requests never included a `Host` header.

Furthermore, support for the
`LINKERD2_PROXY_OUTBOUND_PORTS_DISABLE_PROTOCOL_DETECTION` environment
variable has been removed in anticipation of control plane changes that
will provide this configuration via service profiles. This configuration
is never set by the proxy injector, so this change does not pose any
issues with regard to compatibility.

---

* metrics: Coerce targets to metric labels by-reference (linkerd/linkerd2-proxy#706)
* outbound: Unify TCP & HTTP target types (linkerd/linkerd2-proxy#707)
* inbound: Fix source tap annotations (linkerd/linkerd2-proxy#712)
* trace-context: Simplify implementation with async (linkerd/linkerd2-proxy#710)
* outbound: Use profile to inform protocol detection (linkerd/linkerd2-proxy#708)
* inbound: Fix URI normalization for orig-proto requests (linkerd/linkerd2-proxy#713)
* outbound: more TCP tests, test cleanup (linkerd/linkerd2-proxy#711)
* gateway: Ensure proper outbound metadata (linkerd/linkerd2-proxy#715)
2020-10-14 08:11:17 -07:00
Oliver Gould 4d7da72192
proxy: v2.114.0 (#5062)
This release overhauls the discovery and routing logic implemented by
the proxy: instead of looking at HTTP request metadata for service
discovery, the outbound proxy now exclusively use each connection's
target IP:PORT. This eager resolution eliminates per-request cache
binding; and supports using TrafficSplit with non-HTTP services.

This has a few side effects:

- The `l5d-dst-override` header is no longer honored.
- When the application attempts to connect to a pod IP, the proxy no
  longer load balances these requests among all pods in the service.
  The proxy will now honor session-stickiness as selected by an
  application-level load balancer.
- `TrafficSplits` are only applied when a client targets a service's IP.
- The proxy no longer performs DNS "canonicalization" to translate
  relative host header names to a fully-qualified form.

---

* Unify RequestFilter and Admit middlewares (linkerd/linkerd2-proxy#692)
* Only allow name-based profile discovery for inbound requests (linkerd/linkerd2-proxy#695)
* outbound: initial tests for TCP mTLS (with fewer moving parts) (linkerd/linkerd2-proxy#693)
* Stop honoring DESTINATION_GET_* configuration (linkerd/linkerd2-proxy#696)
* stack: add SwitchReady service (linkerd/linkerd2-proxy#694)
* telemetry: Remove trailing comma in build_info labels (linkerd/linkerd2-proxy#699)
* Update Rust to 1.47.0 (linkerd/linkerd2-proxy#701)
* cache: Delete benchmarks (linkerd/linkerd2-proxy#705)
* outbound: Discover profiles for each unique TCP target (linkerd/linkerd2-proxy#704)
2020-10-12 12:01:51 -07:00
Oliver Gould 127791c362
proxy: v2.113.0 (#5037)
This release includes changes to TCP metrics to ensure that peer
identities are encoded via the `client_id` and `server_id` labels.

---

* outbound: Explicitly ignore the source address for tap (linkerd/linkerd2-proxy#680)
* Update proxy-api and tonic (linkerd/linkerd2-proxy#682)
* http: Lazily build http/tcp stacks (linkerd/linkerd2-proxy#681)
* outbound: Remove required identity from HttpLogical (linkerd/linkerd2-proxy#683)
* profiles: Expose the fully_qualified_name (linkerd/linkerd2-proxy#684)
* request-filter: Support altering the request type (linkerd/linkerd2-proxy#685)
* tracing: Set contexts in new_service/make_service (linkerd/linkerd2-proxy#686)
* discover: Allow resolution streams to terminate (linkerd/linkerd2-proxy#689)
* metrics: add peer identities to all TLS metric labels (linkerd/linkerd2-proxy#687)
* outbound: Return a default endpoint on reject (linkerd/linkerd2-proxy#690)
* Skip endpoint resolution when profile lookup is rejected (linkerd/linkerd2-proxy#691)
2020-10-02 14:42:26 -07:00
Oliver Gould d4990a642a
proxy: v2.112.0 (#5003)
This release increases the default timeout for DNS resolution to 500ms,
as there were reports that 100ms was too restrictive.

This also includes several internal changes to facilitate
connection-oriented caching; but these changes are not expected to
impact runtime behavior.

---

* cache: Implement NewService (linkerd/linkerd2-proxy#668)
* Implement fallback for NewService (linkerd/linkerd2-proxy#669)
* discover: Make endpoints with `NewService` (linkerd/linkerd2-proxy#671)
* Implement profile discovery as a NewService (linkerd/linkerd2-proxy#673)
* Make HTTP client stacks synchronous (linkerd/linkerd2-proxy#674)
* Increase default Dns canonicalize timeout (linkerd/linkerd2-proxy#672)
* Update the accept stack to use NewService (linkerd/linkerd2-proxy#675)
* Split prefix buffering from HTTP detection (linkerd/linkerd2-proxy#676)
* transport: Fix server address metadtata (linkerd/linkerd2-proxy#678)
* outbound: Restore spawn-ready (linkerd/linkerd2-proxy#679)
2020-09-29 13:33:28 -07:00
Oliver Gould d98c11b47e
proxy: v2.110.0 (#4987)
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)
2020-09-18 17:36:32 -07:00
Oliver Gould 9c3ef55a3c
proxy: v2.109.0 (#4957)
This release includes several major changes to the proxy's behavior:

- Service profile lookups are now necessary and fundamental to outbound
  discovery for HTTP traffic. That is, if a service profile lookup is
  rejected, endpoint discovery will not be performed; and endpoint
  discovery must succeed for all destinations that are permitted by
  service profiles. This simplifies caching and buffering to reduce
  latency (especially under concurrency).
- Service discovery is now performed for all TCP traffic, and
  connections are balanced over endpoints according to connection
  latency.
- This enables mTLS for **all** meshed connections; not just HTTP.
- Outbound TCP metrics are now hydrated with endpoint-specific labels.

---

* outbound: Cache balancers within profile stack (linkerd/linkerd2-proxy#641)
* outbound: Remove unused error type (linkerd/linkerd2-proxy#648)
* Eliminate the ConnectAddr trait (linkerd/linkerd2-proxy#649)
* profiles: Do not rely on tuples as stack targets (linkerd/linkerd2-proxy#650)
* proxy-http: Remove unneeded boilerplate (linkerd/linkerd2-proxy#651)
* outbound: Clarify Http target types (linkerd/linkerd2-proxy#653)
* outbound: TCP discovery and load balancing (linkerd/linkerd2-proxy#652)
* metrics: Add endpoint labels to outbound TCP metrics (linkerd/linkerd2-proxy#654)
2020-09-10 12:53:10 -07:00
Oliver Gould 8932f52ec6
proxy: v2.108.0 (#4932)
This release improves error handling for DNS errors encountered when
discovering control plane addresses. Such errors are common during
installation, before all components have been started.

---

* Recognize NXDomain Errors (linkerd/linkerd2-proxy#639)
* control: Recover from failed resolutions (linkerd/linkerd2-proxy#640)
* svc: Update stack diagnostic checks (linkerd/linkerd2-proxy#642)
* service-profiles: Eliminate the HasDestination trait (linkerd/linkerd2-proxy#643)
* outbound: Make discovery error detection generic (linkerd/linkerd2-proxy#644)
* Restore disabled portion of profile override test (linkerd/linkerd2-proxy#645)
* service-profiles: Cleanup crate organization (linkerd/linkerd2-proxy#646)
* Update tower to tower-rs/tower@ad348d8 (linkerd/linkerd2-proxy#647)
2020-08-31 12:50:41 -07:00
Oliver Gould 2122b43977
proxy: v2.107.0 (#4917)
This release includes internal changes to the service discovery system,
especially when discovering control plane components (like the
destination and identity controllers). Now, the proxy attempts to
balance requests across all pods in each control plane service. This
requires control plane changes to use "headless" services so that SRV
records are exposed. When the control plane services have a `clusterIP`
set, the proxy falls back to using normal A-record lookups.

---

* tracing: add richer verbose spans to http clients (linkerd/linkerd2-proxy#622)
* trace: update tracing dependencies (linkerd/linkerd2-proxy#623)
* Remove `Resolution` trait (linkerd/linkerd2-proxy#606)
* Update proxy-identity to edge-20.8.2 (linkerd/linkerd2-proxy#627)
* Add build arg for skipping identity wrapper (linkerd/linkerd2-proxy#624)
* Wait for proxy thread to terminate in integration tests (linkerd/linkerd2-proxy#625)
* Remove scrubbing for unused headers (linkerd/linkerd2-proxy#628)
* Split orig-proto tests out of discovery tests (linkerd/linkerd2-proxy#629)
* Re-enable outbound timeout test (linkerd/linkerd2-proxy#630)
* profiles: perform profile resolution for IP addresses (linkerd/linkerd2-proxy#626)
* Move resolve api to async-stream (linkerd/linkerd2-proxy#599)
* Decouple discovery buffering from endpoint conversion (linkerd/linkerd2-proxy#631)
* resolve: Add a Reset state (linkerd/linkerd2-proxy#633)
* resolve: Eagerly fail resolutions (linkerd/linkerd2-proxy#634)
* test: replace `net2` dependency with `socket2` (linkerd/linkerd2-proxy#635)
* dns: Run DNS resolutions on the main runtime (linkerd/linkerd2-proxy#637)
* Load balance requests to the control plane (linkerd/linkerd2-proxy#594)
* Unify control plane client construction (linkerd/linkerd2-proxy#638)
2020-08-26 15:16:05 -07:00
Oliver Gould 74f5c1a74a
proxy: v2.106.0 (#4842)
This release enables a multi-threaded runtime. Previously, the proxy
would only ever use a single thread for data plane processing; now, when
the proxy is allocated more than 1 CPU share, the proxy allocates a
thread per available CPU. This has shown substantial latency
improvements in benchmarks, especially when the proxy is serving
requests for many concurrent connections.

---

* Add a `multicore` feature flag (linkerd/linkerd2-proxy#611)
* Add `multicore` to default features (linkerd/linkerd2-proxy#612)
* admin: add an endpoint to dump spawned Tokio tasks (linkerd/linkerd2-proxy#595)
* trace: roll `tracing` and `tracing-subscriber` dependencies (linkerd/linkerd2-proxy#615)
* stack: Add NewService::into_make_service (linkerd/linkerd2-proxy#618)
* trace: tweak tracing & test support for the multithreaded runtime (linkerd/linkerd2-proxy#616)
* Make FailFast cloneable (linkerd/linkerd2-proxy#617)
* Move HTTP detection & server into linkerd2_proxy_http (linkerd/linkerd2-proxy#619)
* Mark tap integration tests as flakey (linkerd/linkerd2-proxy#621)
* Introduce a SkipDetect layer to preempt detection (linkerd/linkerd2-proxy#620)
2020-08-06 10:44:53 -07:00
Oliver Gould 8f01fd9b5e
proxy: v2.105.0 (#4814)
This proxy release comprises mostly internal changes that set up for
upcoming discovery changes.

A `proxy_build_info` metric has been added to expose proxy build
metadata via the admin interface, i.e., for Prometheus.

---

* ci: Run all builds on GitHub Actions (linkerd/linkerd2-proxy#604)
* error: Make backoff streams infallible (linkerd/linkerd2-proxy#605)
* trace: update tracing-subscriber to 0.2.8; add spans to JSON (linkerd/linkerd2-proxy#597)
* remove git deps on hyper and h2 (linkerd/linkerd2-proxy#596)
* Add proxy_build_info metric (linkerd/linkerd2-proxy#600)
* Move tls::accept to async/await (linkerd/linkerd2-proxy#607)
* Move metrics::Io to io::SensorIo (linkerd/linkerd2-proxy#610)
* Simplify proxy::Server as ServeHttp (linkerd/linkerd2-proxy#608)
2020-07-30 13:09:36 -07:00
Ali Ariff d457178f43
Fetch proxy with specific arch (#4739)
https://github.com/linkerd/linkerd2-proxy/pull/593 changed the proxy
release process to produce platform-specific binaries.

This change modifies the bin/fetch-proxy script to fetch amd64-specific
binaries. The proxy version has been updated to v1.104.1, which includes
no code changes since v1.104.0.

Signed-off-by: Ali Ariff <ali.ariff12@gmail.com>
2020-07-13 17:48:34 -07:00
Oliver Gould ac96a19ec2
proxy: v2.104.0 (#4738)
This release primarily includes a fix for a regression in the tracing
system introduced in v2.101.0.

We have also made some internal changes to reduce latency in benchmarks.

---

* enable `parking_lot` locks in dependencies (linkerd/linkerd2-proxy#589)
* remove deprecated pin-project attribute (linkerd/linkerd2-proxy#590)
* use native-tracing versions of hyper and h2 (linkerd/linkerd2-proxy#591)
* Simplify tap server (linkerd/linkerd2-proxy#582)
* opencensus: drive rsp future to establish conn (linkerd/linkerd2-proxy#588)
* Add compile-time support for mimalloc (linkerd/linkerd2-proxy#592)
2020-07-09 10:54:23 -07:00
Oliver Gould 92dd292819
proxy: v2.103.0 (#4703)
This release increases the default buffer size to match the proxy's
in-flight request limit. This reduces contention in overload--especially
high-concurrency--situations, substantially reducing tail latency.

---

* update test-support clients and servers to be natively async (linkerd/linkerd2-proxy#580)
* Print build diagnostics in docker (linkerd/linkerd2-proxy#583)
* update test controllers to std::future/Tonic; remove threads (linkerd/linkerd2-proxy#585)
* buffer: Box the inner service's reponse future (linkerd/linkerd2-proxy#586)
* Eliminate Bind & Listen traits (linkerd/linkerd2-proxy#584)
* cache: replace Lock with Buffer (linkerd/linkerd2-proxy#587)
2020-07-02 11:27:30 -07:00
Oliver Gould ee7a73cd87
proxy: v2.102.0 (#4670)
This release fixes a regression that could cause service profile lookups
to be retried indefinitely, despite the server returning an
`InvalidArgument` response (which indicates the proxy should not retry).

---

* fix InvalidProfileAddr not converting into DiscoveryRejected (linkerd/linkerd2-proxy#581)
2020-06-25 12:53:46 -07:00
Oliver Gould 2fd05979de
proxy: v2.101.0 (#4658)
This release primarily features an upgrade of the proxy's underlying
Tokio runtime and its related libraries. We've observed lower latencies
in initial benchmarks, but further testing and burn-in is warranted.

Also, the proxy now honors the `LINKERD_PROXY_LOG_FORMAT=json`
configuration to enable JSON-formatted logging.

---

* Add a CODEOWNERS (linkerd/linkerd2-proxy#558)
* Fix shellcheck issues in shell scripts (linkerd/linkerd2-proxy#554)
* update the proxy to use std::future and Tokio 0.2 (linkerd/linkerd2-proxy#568)
* Prune unused dependencies (linkerd/linkerd2-proxy#569)
* Support LINKERD_PROXY_LOG_FORMAT=json (linkerd/linkerd2-proxy#500)
* Change docs references from "master" to "main" (linkerd/linkerd2-proxy#571)
* Upgrade tokio-rustls & webpki. (linkerd/linkerd2-proxy#570)
* Makefile: Add shellcheck recipe (linkerd/linkerd2-proxy#555)
* Update proxy-api dependencies (linkerd/linkerd2-proxy#573)
* integration: fix missing traces (linkerd/linkerd2-proxy#572)
* Update Rust to 1.44.0 (linkerd/linkerd2-proxy#574)
* Use async/await to simplify connection-accept task (linkerd/linkerd2-proxy#575)
* Update Rust to 1.44.1 (linkerd/linkerd2-proxy#576)
* outbound: Split HTTP endpoint builder (linkerd/linkerd2-proxy#578)
* Simplify protocol detection with async/await (linkerd/linkerd2-proxy#577)
* Pin proxy-api at v0.1.13 (linkerd/linkerd2-proxy#579)
2020-06-23 19:04:28 -07:00
Oliver Gould 7cc5e5c646
multicluster: Use the proxy as an HTTP gateway (#4528)
This change modifies the linkerd-gateway component to use the inbound
proxy, rather than nginx, for gateway. This allows us to detect loops and
propagate identity through the gateway.

This change also cleans up port naming to `mc-gateway` and `mc-probe`
to resolve conflicts with Kubernetes validation.

---

* proxy: v2.99.0

The proxy can now operate as gateway, routing requests from its inbound
proxy to the outbound proxy, without passing the requests to a local
application. This supports Linkerd's multicluster feature by adding a
`Forwarded` header to propagate the original client identity and assist
in loop detection.

---

* Add loop detection to inbound & TCP forwarding (linkerd/linkerd2-proxy#527)
* Test loop detection (linkerd/linkerd2-proxy#532)
* fallback: Unwrap errors recursively (linkerd/linkerd2-proxy#534)
* app: Split inbound/outbound constructors into components (linkerd/linkerd2-proxy#533)
* Introduce a gateway between inbound and outbound (linkerd/linkerd2-proxy#540)
* gateway: Add a Forwarded header (linkerd/linkerd2-proxy#544)
* gateway: Return errors instead of responses (linkerd/linkerd2-proxy#547)
* Fail requests that loop through the gateway (linkerd/linkerd2-proxy#545)

* inject: Support config.linkerd.io/enable-gateway

This change introduces a new annotation,
config.linkerd.io/enable-gateway, that, when set, enables the proxy to
act as a gateway, routing all traffic targetting the inbound listener
through the outbound proxy.

This also removes the nginx default listener and gateway port of 4180,
instead using 4143 (the inbound port).

* proxy: v2.100.0

This change modifies the inbound gateway caching so that requests may be
routed to multiple leaves of a traffic split.

---

* inbound: Do not cache gateway services (linkerd/linkerd2-proxy#549)
2020-06-02 19:37:14 -07:00
Oliver Gould 2b8df8076d
proxy: v2.98.0 (#4470)
In some ingress setups, the proxy could be tricked into looping requests
through the outbound proxy. We now detect these loops and fail these
requests with a 502, saving your precious CPU.

---

* outbound: Prevent loops (linkerd/linkerd2-proxy#525)
2020-05-22 09:29:00 -07:00
Oliver Gould bfe02490ad
proxy: v2.97.0 (#4392)
This release adds special handling for I/O errors in HTTP responses so
that an `errno` label is included to describe the underlying errors
in the proxy's metrics.

---

* Add an `i/o` error label to http metrics (linkerd/linkerd2-proxy#512)
2020-05-13 16:07:12 -07:00
Oliver Gould a12073d6a8
proxy: v2.96.0 (#4374)
This release reduces latency and CPU consumption, especially for high-
concurrency use cases.

---

* Add middleware that rejects connections with no identity (linkerd/linkerd2-proxy#507)
* Buffer requests while the service is pending (linkerd/linkerd2-proxy#511)
2020-05-11 15:27:25 -07:00
Oliver Gould 5b7c8f82d4
proxy: v2.95.0 (#4344)
This release modifies Linkerd's internal buffering to avoid idling out
services as a request arrives. This could cause failures for requests
that are sent exactly once per minute, such as Prometheus scrapes.

---

* Set a grpc-status of UNAVAILABLE only on io errors (linkerd/linkerd2-proxy#498)
* inbound: Remove unnecessary buffer (linkerd/linkerd2-proxy#501)
* buffer: Move idle timeouts into the buffer (linkerd/linkerd2-proxy#502)
* make: Support CARGO_TARGET for multi-arch builds (linkerd/linkerd2-proxy#497)
* release: Use arch-specific paths (linkerd/linkerd2-proxy#508)
2020-05-07 08:13:51 -07:00
Eliza Weisman 8cf2d63feb
proxy: v2.94.0 (#4313)
This release improves gRPC-aware error handling to set a `grpc-status`
to `UNAVAILABLE` when a response stream is interrupted by a transport
error. This is consistent with common gRPC implementations' error-
handling behavior.

---

* Handle GRPC body errors (linkerd/linkerd2-proxy#493)
2020-04-30 11:41:43 -07:00
Oliver Gould 5ecf2cc57b
proxy: v2.93.0 (#4283)
This release introduces a per-endpoint authority-override feature. This
is driven by the destination controller and is needed to support
mutli-cluster gateways.

---

* Update to Rust 1.42.0 (linkerd/linkerd2-proxy#483)
* Adjust metric description. (linkerd/linkerd2-proxy#484)
* Use authority override from metadata (linkerd/linkerd2-proxy#458)
2020-04-22 13:57:02 -07:00
Oliver Gould b3587633a0
proxy: v2.92.0 (#4264)
This release includes a new protocol detection timeout, which prevents
clients from consuming resources indefinitely when they do not send any
data.

Additionally: the proxy's admin endpoint now supports a `/live` endpoint
for liveness checks, and a feature has been added to enrich tracing
metadata from a file of label/values.

---

* Add Labels from a path as oc-collector attributes (linkerd/linkerd2-proxy#463)
* Add liveness endpoint to admin server (linkerd/linkerd2-proxy#470)
* docker: Use buildkit for caching (linkerd/linkerd2-proxy#472)
* Makefile: Use STRIP variable with strip as default (linkerd/linkerd2-proxy#475)
* Add checksec to the release process (linkerd/linkerd2-proxy#476)
* Time out protocol detect futures (linkerd/linkerd2-proxy#464)
* Ensure that checksec is executable (linkerd/linkerd2-proxy#477)
* Fix the checksec URL (linkerd/linkerd2-proxy#478)
* Undo hardcoded release version (linkerd/linkerd2-proxy#479)
2020-04-15 17:19:26 -07:00
Oliver Gould 5ad3a4f72c
proxy: v2.91.0 (#4228)
This release fixes a bug introduced in v2.89.0 that could cause spurious
timeouts for inbound proxies that handle HTTP requests for many distinct
domains.

---

* inbound: Do not cache per-endpoint services (linkerd/linkerd2-proxy#469)
2020-04-02 14:48:45 -07:00
Oliver Gould 2b8f1b27c2
proxy: v2.90.0 (#4218)
This release restores the `route_actual_response_total` metric, which is
needed for `linkerd routes -o wide`.

---

* Update test certificates (linkerd/linkerd2-proxy#460)
* Use strong_count instead of upgrade on weak Arcs in cache (linkerd/linkerd2-proxy#459)
* Wire authority override coming from discovery (linkerd/linkerd2-proxy#462)
* Update integration tests certs (linkerd/linkerd2-proxy#465)
* Add a `mock-orig-dst` feature flag (linkerd/linkerd2-proxy#466)
* http-metrics: Make latency export optional (linkerd/linkerd2-proxy#467)
* Restore the route_actual_response_total metric (linkerd/linkerd2-proxy#468)
2020-03-31 15:02:26 -07:00
Oliver Gould bbca18492e
proxy: v2.89.0 (#4163)
This release builds on changes in the prior release to ensure that
balancers process updates eagerly.

Cache capacity limitations have been removed; and services now fail
eagerly, rather than making all requests wait for the timeout to expire.

Also, a bug was fixed in the way the `LINKERD2_PROXY_LOG` env variable
is parsed.

---

* Introduce a backpressure-propagating buffer (linkerd/linkerd2-proxy#451)
* trace: update tracing-subscriber to 0.2.3 (linkerd/linkerd2-proxy#455)
* timeout: Introduce FailFast, Idle, and Probe middlewares (linkerd/linkerd2-proxy#452)
* cache: Let services self-evict (linkerd/linkerd2-proxy#456)
2020-03-10 13:02:44 -07:00
cpretzer 30db209804
proxy: v2.88.0 (#4136)
* proxy: v2.88.0

This release includes a significant internal change to how backpressure
is handled in the proxy. These changes fix a class of bugs related to discovery
staleness, and it should be rarer to encounter "dispatch timeout"
errors.

---

* orig-proto: Be more flexible to stack placement (linkerd/linkerd2-proxy#444)
* Remove Clone requirement from controller clients (linkerd/linkerd2-proxy#449)
* server: Simplify HTTP server type constraints (linkerd/linkerd2-proxy#450)
* Overhaul buffering & caching to better-support backpressure (linkerd/linkerd2-proxy#453)
2020-03-05 11:03:05 -08:00
Oliver Gould 1c127c4902
proxy: v2.87.0 (#4110)
This release comprises many internal changes that are not expected to
have any user-facing impact.

There is one user-facing change: the inbound router's default capacity
has been increased from 100 to 10K to accomodate environments that have
a high cardinality of virtual hosts served by a single pod.

---

* fallback: Operate on Services instead of Layers (linkerd/linkerd2-proxy#432)
* internal: Extract a service-profile crate (linkerd/linkerd2-proxy#433)
* Increase inbound router capacity default to 10000 (linkerd/linkerd2-proxy#434)
* Upgrade to Rust 1.41 (linkerd/linkerd2-proxy#437)
* cleanup: Remove various cruft (linkerd/linkerd2-proxy#438)
* Generalize router::Make as stack::NewService (linkerd/linkerd2-proxy#435)
* integration: Make the test controller more realistic (linkerd/linkerd2-proxy#436)
* trace-context: Remove unnecessary MakeService (linkerd/linkerd2-proxy#439)
* Split the `stack-tracing` crate from `app-core` (linkerd/linkerd2-proxy#440)
* stack: Introduce the Proxy trait (linkerd/linkerd2-proxy#441)
* timeout: Do not synthesize HTTP response (linkerd/linkerd2-proxy#442)
* addr: Avoid trailing dots in authorities (linkerd/linkerd2-proxy#446)
* outbound: Relax type constraints in require_identity_on_endpoint (linkerd/linkerd2-proxy#447)
* Cleanup transport::Connect & http::Client types (linkerd/linkerd2-proxy#443)
* app: Use locks with controller clients (linkerd/linkerd2-proxy#448)
2020-02-27 07:26:26 -08:00
Oliver Gould dc451208d4
proxy: v2.86.0 (#4075)
This release includes the results from continued profiling & performance
analysis. In addition to modifying internals to prevent unwarranted
memory growth, we've introduced new metrics to aid in debugging and
diagnostics: a new `request_errors_total` metric exposes the number of
requests that receive synthesized responses due to proxy errors; and a
suite of `stack_*` metrics expose proxy internals that can help us
identify unexpected behavior.

---

* trace: update `tracing-subscriber` dependency to 0.2.1 (linkerd/linkerd2-proxy#426)
* Reimplement the Lock middleware with tokio::sync (linkerd/linkerd2-proxy#427)
* Add the request_errors_total metric (linkerd/linkerd2-proxy#417)
* Expose the number of service instances in the proxy (linkerd/linkerd2-proxy#428)
* concurrency-limit: Share a limit across Services (linkerd/linkerd2-proxy#429)
* profiling: add benchmark and profiling scripts (linkerd/linkerd2-proxy#406)
* http-box: Box HTTP payloads via middleware (linkerd/linkerd2-proxy#430)
* lock: Generalize to protect a guarded value (linkerd/linkerd2-proxy#431)
2020-02-19 14:24:47 -08:00
Oliver Gould afcbebd30a
proxy: v2.85.0 (#4010)
This release fixes a bug in the proxy's logging subsystem that could
cause the proxy to consume memory until the process is OOMKilled,
especially when the proxy was configured to log diagnostic information.

The proxy also now properly emits `grpc-status` headers when signaling
proxy errors to gRPC clients.

This release upgrades the proxy's Rust version, the `http` crate
dependency to address RUSTSEC-2019-0033 and RUSTSEC-2019-0034, and the
`prost` crate dependency has been patched to address RUSTSEC-2020-02.

---

* internal: Introduce a locking middleware (linkerd/linkerd2-proxy#408)
* Update to Rust 1.40 with new Cargo.lock format (linkerd/linkerd2-proxy#410)
* Update http to v0.1.21 (linkerd/linkerd2-proxy#412)
* internal: Split retry, http-classify, and http-metrics (linkerd/linkerd2-proxy#409)
* Actually update http to v0.1.21 (linkerd/linkerd2-proxy#413)
* patch `prost` 0.5 to pick up security fix (linkerd/linkerd2-proxy#414)
* metrics: Make Counter & Gauge atomic (linkerd/linkerd2-proxy#415)
* Set grpc-status headers on dispatch errors (linkerd/linkerd2-proxy#416)
* trace: update `tracing-subscriber` to 0.2.0-alpha.4 (linkerd/linkerd2-proxy#418)
* discover: Warn on discovery error (linkerd/linkerd2-proxy#422)
* router: Avoid large up-front allocations (linkerd/linkerd2-proxy#421)
* errors: Set correct HTTP version on responses (linkerd/linkerd2-proxy#424)
* app: initialize tracing prior to parsing env vars (linkerd/linkerd2-proxy#425)
* trace: update tracing-subscriber to 0.2.0-alpha.6 (linkerd/linkerd2-proxy#423)
2020-02-04 10:41:50 -08:00
Oliver Gould dba20ce33f
proxy: v2.84.0 (#3932)
This release fixes an issue that could cause the OpenCensus exporter to
stall.

This release does NOT include the experimental changes from
v2.83.0-experimental.

---

* http: Use the endpoint type to inform URI normalization (linkerd/linkerd2-proxy#404)
* Remove clone in opencensus exporter to ensure task is notified (linkerd/linkerd2-proxy#405)
2020-01-15 12:47:43 -08:00
Oliver Gould d3d8d855f0
proxy: v2.83.0-experimental (#3897)
This is an experimental release that includes large changes to the
proxy's request buffering and backpressure infrastructure.

Please exercise caution before deploying this proxy version into mission
critical environments.
2020-01-09 14:12:46 -08:00
Oliver Gould 4964e36b45
proxy: v2.82.0 (#3848)
This release adds a defense mechanism to ensure that resolutions are
released when the associated balancer becomes idle and should have
been dropped from the proxy.

Furthermore, the proxy is now more selective as to which gRPC status
codes are considered "failures" in metrics.

---

* Classify some gRPC status codes as non-errors (linkerd/linkerd2-proxy#395)
* discover: Timeout stalled resolutions (linkerd/linkerd2-proxy#401)
2019-12-19 09:15:59 -08:00
Oliver Gould f52056c3b7 proxy: v2.81.0 (#3817)
v2.80.0 fixed a problem where the destination controller client's
connection receive window could become exhausted, preventing additional
updates from the controller. The connection window has been increased
from 64K to 1MB to prevent a single stalled stream from block others.

Furthermore, discovery for IP addresses has been disabled in the proxy,
as the control plane does not yet support these resolutions. This
additionally lessons the load on the destination controller client.

---

* profiles: Eagerly read profiles off the wire (linkerd/linkerd2-proxy#397)
* router: Ensure that the purge task completes (linkerd/linkerd2-proxy#396)
* app-core: Add `accept` context with peer addr (linkerd/linkerd2-proxy#398)
* Remove default for destination lookup subnets (linkerd/linkerd2-proxy#399)
* Configure the HTTP/2 connection window to 1MB (linkerd/linkerd2-proxy#400)
2019-12-12 08:58:17 -05:00
Oliver Gould 954d1175b9 proxy: v2.79.0 (#3713)
* proxy: v2.79.0

This release includes internal dependencies updates including the Rust
compiler and the proxy's load balancer.

No user-facing changes are anticipated.

---

* Update Rust to 1.39.0 (linkerd/linkerd2-proxy#391)
* Update tower-balance (linkerd/linkerd2-proxy#392)
* Make the router HTTP-agnostic (linkerd/linkerd2-proxy#394)
* Make fallback HTTP-agnostic (linkerd/linkerd2-proxy#393)

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-11-14 11:45:56 -08:00
Alex Leong 6c69ca94d0
proxy: v2.78.0 (#3693)
This release enables discovery for network address destinations. This
enables mesh identity for services like Prometheus that do pod-to-pod
communication without DNS names.

---

* make: Do not compile integration tests during packaging (linkerd/linkerd2-proxy#390)
* Resolve private IP addresses via the destination service (linkerd/linkerd2-proxy#388)
* internal: Decouple TCP forwarding from protocol dispatch (linkerd/linkerd2-proxy#389)

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-11-13 10:05:34 -08:00
Oliver Gould edd2fc3865 proxy: v2.77.0 (#3684)
* proxy: v2.77.0

While much of the proxy has been restructured in support of upcoming TCP
mTLS enhancements, the only user-facing change anticipated in this
release is improved debug/error logging from the proxy, which now
includes a wealth of contextual information.

---

* Update maintainers.md (linkerd/linkerd2-proxy#366)
* internal: Split Accept from Listen (linkerd/linkerd2-proxy#368)
* internal: Remove the `ClientUsedTls` response extension (linkerd/linkerd2-proxy#370)
* internal: Split transport utilities into a subcrate (linkerd/linkerd2-proxy#369)
* Audit Cargo.lock for unused and outdated crates (linkerd/linkerd2-proxy#373)
* Adopt tokio-tracing contexts (linkerd/linkerd2-proxy#374)
* internal: Spilt app from linkerd2-proxy (linkerd/linkerd2-proxy#375)
* ci: Run docker builds on linkerd-docker host (linkerd/linkerd2-proxy#376)
* Update to Rust 1.38.0 (linkerd/linkerd2-proxy#377)
* Remove the LINKERD2_PROXY_INBOUND_FORWARD config (linkerd/linkerd2-proxy#379)
* Remove the linkerd2-task crate (linkerd/linkerd2-proxy#380)
* Record transport metrics after protocol detection (linkerd/linkerd2-proxy#381)
* Cleanup unused sock I found lying around (linkerd/linkerd2-proxy#384)
* internal: Move suffix-filtering into profiles API (linkerd/linkerd2-proxy#386)
* internal: Split tap out of app-core (linkerd/linkerd2-proxy#387)
* Modularize proxy initialization (linkerd/linkerd2-proxy#382)
2019-11-06 16:25:25 -08:00
Zahari Dichev b7207a2d8c
Revert "proxy: v2.76.0 (#3593)" (#3636)
This reverts commit 2c758154cf.

Signed-off-by: zaharidichev <zaharidichev@gmail.com>
2019-10-24 18:46:26 +03:00
Oliver Gould 2c758154cf proxy: v2.76.0 (#3593)
* proxy: v2.76.0

This release does not impact any user-facing behavior. The proxy's
internals have been restructured.

---

* Update maintainers.md (linkerd/linkerd2-proxy#366)
* internal: Split Accept from Listen (linkerd/linkerd2-proxy#368)
* internal: Remove the `ClientUsedTls` response extension (linkerd/linkerd2-proxy#370)
* internal: Split transport utilities into a subcrate (linkerd/linkerd2-proxy#369)
* Audit Cargo.lock for unused and outdated crates (linkerd/linkerd2-proxy#373)
* Adopt tokio-tracing contexts (linkerd/linkerd2-proxy#374)
* internal: Spilt app from linkerd2-proxy (linkerd/linkerd2-proxy#375)
* ci: Run docker builds on linkerd-docker host (linkerd/linkerd2-proxy#376)
* Update to Rust 1.38.0 (linkerd/linkerd2-proxy#377)

* fixup! proxy: v2.76.0
2019-10-24 09:56:26 +03:00
Alex Leong bcf54b7e12
proxy: Update to v2.75.0 (#3508)
* Handle 8 byte trace ids (linkerd/linkerd2-proxy#365)

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-10-01 15:41:52 -07:00
Oliver Gould 38a2f3ad59 proxy: Update to v2.74.0 (#3502)
This release updates the Tap server to support emitting request and
response headers with Tap events.

* logging: update tracing-subscriber to 0.1.4 (linkerd/linkerd2-proxy#364)
* tap: add headers to tap events (linkerd/linkerd2-proxy#348)
* internal: Remove the SetKeepalive trait (linkerd/linkerd2-proxy#363)
2019-09-30 13:38:45 -07:00
Oliver Gould 5ad1233295 proxy: Update to v2.73.0 (#3479)
* Add distributed tracing support (linkerd/linkerd2-proxy#354)
* ci: Run integration tests on dedicated host (linkerd/linkerd2-proxy#358)
* Add http metadata to spans as annotations (linkerd/linkerd2-proxy#359)
* Instrument the opencensus exporter (linkerd/linkerd2-proxy#362)
2019-09-26 10:30:21 -07:00