Skip to content

Add histogram for maximum concurrent requests per connection#12241

Closed
ggreenway wants to merge 1 commit intoenvoyproxy:masterfrom
ggreenway:cx_concurrent_hist
Closed

Add histogram for maximum concurrent requests per connection#12241
ggreenway wants to merge 1 commit intoenvoyproxy:masterfrom
ggreenway:cx_concurrent_hist

Conversation

@ggreenway
Copy link
Copy Markdown
Member

Signed-off-by: Greg Greenway ggreenway@apple.com

Commit Message: This gives visibility into concurrent connections, and can help in setting an appropriate value for http2_protocol_options.max_concurrent_streams.
Additional Description:
Risk Level: low
Testing: TODO
Docs Changes: TODO
Release Notes: TODO
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

Signed-off-by: Greg Greenway <ggreenway@apple.com>
@ggreenway
Copy link
Copy Markdown
Member Author

Questions:

  • Would we want a config setting to disable in order to save memory?
  • Would it be better to do this as an http filter? I figured out how to do it using FilterState with a lifetime of Connection and emitting the histogram metric from the destructor of the FilterState, but it was a lot more code with some object lifetime complexities.

@ggreenway
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Makes sense to me. LMK when you have cleaned up with docs, etc.

/wait

@stale
Copy link
Copy Markdown

stale bot commented Aug 1, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 1, 2020
@stale
Copy link
Copy Markdown

stale bot commented Aug 9, 2020

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this Aug 9, 2020
jmarantz added a commit that referenced this pull request Aug 11, 2020
…e so that two with the same name map to the same histogram object. (#12275)

Commit Message: Creates a storage model for thread-local histograms enabling continuity of data across scope reloads. Previously, whenever a Scope was re-created, the counters, gauges, and text-readouts of the same names would retain their previous values. However, fresh histograms were created on every scope reload, and stats dumps would include duplicate histograms with the same name.

This change adds an analogous name-based set of histograms, held in ThreadLocalStore, so that we have a single histogram representing all its generations of data. This is somewhat more complex than for the other stats, since there were thread-local buffers, which previously were owned by TlsScope and needed to be made independent. So this introduces a new tls histogram map in the tls-cache to maintain this.

This should help unblock #12241.

Additional Description:
Risk Level: high (not clear whether this is enough testing of histogram usage)
Testing: //test/...
Docs Changes: n/a
Release Notes: n/a
Fixes: #3098

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently waiting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants