Skip to content

Commit

Permalink
shutdown manager: use filter on downstream_cx_active stats url (#6523)
Browse files Browse the repository at this point in the history
Add a filter to prometheus stats url so that
only the desired stats are returned. This improves
the performance especially in clusters with high
number of routes

Signed-off-by: Ahmad Karimi <[email protected]>
  • Loading branch information
therealak12 authored Jun 20, 2024
1 parent 9f25ff6 commit db4092e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/unreleased/6523-therealak12-small.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve shutdown manager query to the Envoy stats endpoint for active connections by utilizing a regex filter query param.
4 changes: 3 additions & 1 deletion cmd/contour/shutdownmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ import (
)

const (
prometheusURL = "http://unix/stats/prometheus"
// The prometheusURL is used to fetch the envoy metrics. Note that the filter
// value matches Envoy's raw stat names (i.e. those on the `/stats/` endpoint).
prometheusURL = "http://unix/stats/prometheus?filter=^http\\..*\\.downstream_cx_active$"
healthcheckFailURL = "http://unix/healthcheck/fail"
prometheusStat = "envoy_http_downstream_cx_active"
)
Expand Down

0 comments on commit db4092e

Please sign in to comment.