Commit Graph

5 Commits

Author SHA1 Message Date
Oliver Gould 37d6e56f3a
Make `metrics` private to `telemetry` (#59)
Only the `DstLabels` and `Serve` types in `metrics` are used outside of
`telemetry`.

This change narrows visibility so that `metrics` is not referenced
outside of `telemetry`.
2018-08-10 11:41:36 -07:00
Sean McArthur ab1b280de8
Add orig-proto which uses HTTP2 between proxies (#32)
When the destination service returns a hint that an endpoint is another
proxy, eligible HTTP1 requests are translated into HTTP2 and sent over
an HTTP2 connection. The original protocol details are encoded in a
header, `l5d-orig-proto`. When a proxy receives an inbound HTTP2
request with this header, the request is translated back into its HTTP/1
representation before being passed to the internal service.

Signed-off-by: Sean McArthur <sean@buoyant.io>
2018-08-03 15:03:14 -07:00
Eliza Weisman 1e24aeb615
Limit concurrent Destination service queries (#36)
Required for linkerd/linkerd2#1322.

Currently, the proxy places a limit on the number of active routes
in the route cache. This limit defaults to 100 routes, and is intended
to prevent the proxy from requesting more than 100 lookups from the 
Destination service. 

However, in some cases, such as Prometheus scraping a large number of
pods, the proxy hits this limit even though none of those requests 
actually result in requests to service discovery (since Prometheus 
scrapes pods by their IP addresses). 

This branch implements @briansmith's suggestion in 
https://github.com/linkerd/linkerd2/issues/1322#issuecomment-407161829.
It splits the router capacity limit to two separate, configurable 
limits, one that sets an upper bound on the number of concurrently 
active destination lookups, and one that limits the capacity of the
router cache.

I've done some preliminary testing using the `lifecycle` tests, where a
single Prometheus instance is configured to scrape a very large number 
of proxies. In these tests, neither limit is reached. Furthermore, I've added
integration tests in `tests/discovery` to exercise the destination service 
query limit. These tests ensure that query capacity is released when inactive
routes which create queries are evicted from the router cache, and that the
limit does _not_ effect DNS queries.

This branch obsoletes and closes #27, which contained an earlier version of
these changes.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-08-02 16:40:12 -07:00
Sean McArthur 9f5648d955
fix control client Backoff to poll its timer when backing off (#13)
The `Backoff` service wrapper is used for the controller client service
so that if the proxy can't find the controller (there is a connection
error), it doesn't keep trying in a tight loop, but instead waits a
couple seconds before trying again, presuming that the control plane
was rebooting.

When "backing off", a timer would be set, but it wasn't polled, so the
task was never registered to wake up after the delay. This turns out to
not have been a problem in practice, since the background destination
task was joined with other tasks that were constantly waking up,
allowing it to try again anyways.

To add tests for this, a new `ENV_CONTROL_BACKOFF_DELAY` config value
has been added, so that the tests don't have to wait the default 5
seconds.

Signed-off-by: Sean McArthur <sean@buoyant.io>
2018-07-16 12:41:47 -07:00
Oliver Gould c23ecd0cbc
Migrate `conduit-proxy` to `linkerd2-proxy`
The proxy now honors environment variables starting with
`LINKERD2_PROXY_`.
2018-07-07 22:45:21 +00:00