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

[Serve] Add http request latency #32839

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

sihanwang41
Copy link
Contributor

@sihanwang41 sihanwang41 commented Feb 25, 2023

Why are these changes needed?

Add http request latency metrics.

Related issue number

Closes #32711

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

doc/source/serve/production-guide/monitoring.md Outdated Show resolved Hide resolved
python/ray/serve/_private/http_proxy.py Outdated Show resolved Hide resolved
python/ray/serve/_private/http_proxy.py Outdated Show resolved Hide resolved
@@ -56,9 +56,9 @@ def verify_metrics(do_assert=False):
"serve_deployment_request_counter",
"serve_deployment_replica_starts",
# histogram
"deployment_processing_latency_ms_bucket",
"deployment_processing_latency_ms_count",
"deployment_processing_latency_ms_sum",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why this test was passing before if these metrics didn't exist yet?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I misunderstood, this is a different metric. Still want to know if it was passing or not running though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is same metric, the reason it can pass before because we check whether the deployment_processing_latency_ms_sum string is inside the metrics blob.
For this change, I just want to make the test check more restrict.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah makes sense!

Copy link
Contributor

@architkulkarni architkulkarni left a comment

Choose a reason for hiding this comment

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

Looks good to me pending Edward's suggestions, and it would be good to double check that the test is running in CI

@@ -279,6 +279,9 @@ The following metrics are exposed by Ray Serve:
* error_code
* method
- The number of non-200 HTTP responses returned by each deployment.
* - ``serve_http_request_latency_ms`` [*]
- * endpoint
- The end-to-end latency of HTTP requests (measured from the Serve HTTP proxy).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- The end-to-end latency of HTTP requests (measured from the Serve HTTP proxy).
- A histogram of end-to-end latencies for HTTP requests (measured from the Serve HTTP proxy).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will stick to the original one since it is following our current words convention.

@sihanwang41
Copy link
Contributor Author

@edoakes ping for merge!

@edoakes edoakes merged commit 0c02ae8 into ray-project:master Mar 1, 2023
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request Mar 21, 2023
Add http request latency metrics.

Signed-off-by: Jack He <[email protected]>
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
Add http request latency metrics.

Signed-off-by: Edward Oakes <[email protected]>
peytondmurray pushed a commit to peytondmurray/ray that referenced this pull request Mar 22, 2023
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
Add http request latency metrics.

Signed-off-by: elliottower <[email protected]>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
Add http request latency metrics.

Signed-off-by: Jack He <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Serve] No http latency metrics
5 participants