-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Set timeout for requests made by the EVP proxy #26336
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #26336 +/- ##
===========================================
+ Coverage 44.96% 70.24% +25.28%
===========================================
Files 2353 123 -2230
Lines 272670 10969 -261701
===========================================
- Hits 122595 7705 -114890
+ Misses 140403 2906 -137497
+ Partials 9672 358 -9314
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
65b2507
to
a58d386
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Serverless Benchmark Results
tl;drUse these benchmarks as an insight tool during development.
What is this benchmarking?The The benchmark is run using a large variety of lambda request payloads. In the charts below, there is one row for each event payload type. How do I interpret these charts?The charts below comes from The benchstat docs explain how to interpret these charts.
I need more helpFirst off, do not worry if the benchmarks are failing. They are not tests. The intention is for them to be a tool for you to use during development. If you would like a hand interpreting the results come chat with us in Benchmark stats
|
Without this, a request would continue running even after our Server (which received a request from e.g. a tracer) has already timed out and, because of this, would not propagate the response of the request anyway.
56eb400
to
80e32ef
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv create-vm --pipeline-id=35920216 --os-family=ubuntu |
Hello! Is it possible to add a small unit test verifying this change instead of needing to rely on manual testing using a separate python program? Thanks! |
360a5d7
to
89c8a3e
Compare
This comment has been minimized.
This comment has been minimized.
@ajgajg1134 I added a test that actually waits 1 second to test the timeout. If you think that's not okay, I can change the code to add the |
BenchmarksBenchmark execution time: 2024-06-05 12:45:28 Comparing candidate commit 89c8a3e in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2 metrics, 1 unstable metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good from APM! Thanks for adding a test, I think the unit test covers this pretty well so feel free to add a qa/done label to this PR so no manual QA jira ticket is created
Regression DetectorRegression Detector ResultsRun ID: b962a103-3e92-4b29-ba90-46156e908517 Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | pycheck_1000_100byte_tags | % cpu utilization | +0.49 | [-4.31, +5.29] |
➖ | otel_to_otel_logs | ingress throughput | +0.17 | [-0.20, +0.55] |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.05 | [+0.01, +0.09] |
➖ | trace_agent_msgpack | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.00 | [-0.20, +0.20] |
➖ | trace_agent_json | ingress throughput | -0.01 | [-0.03, +0.01] |
➖ | idle | memory utilization | -0.38 | [-0.42, -0.34] |
➖ | basic_py_check | % cpu utilization | -0.46 | [-3.34, +2.42] |
➖ | tcp_syslog_to_blackhole | ingress throughput | -0.89 | [-22.16, +20.38] |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -1.07 | [-4.01, +1.87] |
➖ | file_tree | memory utilization | -1.51 | [-1.60, -1.42] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
/merge |
🚂 MergeQueue: pull request added to the queue The median merge time in Use |
@knusbaum I don't have permissions to merge this myself, but it looks like I can still use the merge queue flow (?) |
Motivation
Despite the trace-agent API server having a timeout (that defaults to 5 seconds), requests to the EVP proxy endpoint could continue running past this timeout because they were not cancelled themselves. In either case we would close the connection with the client without propagating the response from the server, but we would take way longer than intended.
Describe how to test/QA your changes
Before the patch (and hardcoding the endpoint to a local python server that takes 8 seconds to respond):
After the patch:
Both close the connection without response, but the first one goes over the timeout.