-
Notifications
You must be signed in to change notification settings - Fork 5.3k
HTTP/3 stress tests (requires libmsquic.so) #54762
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
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThis is a temporary workaround to run stress tests for HTTP/3 with a pre-built libmsquic.so (until we have proper packaging for Linux). How to run the testsBefore running, you will need to acquire libmsquic.so and libmsquic.lttng.so and put them to stress dir. cd ${RUNTIME_DIR}/src/libraries/System.Net.Http/tests/StressTests/HttpStress/
cp ${MSQUIC_LIBS_DIR}/libmsquic.so .
cp ${MSQUIC_LIBS_DIR}/libmsquic.lttng.so .
./run-docker-compose.ps1 -clientstressargs "-maxExecutionTime 10 -http 3.0" -serverstressargs "-http 3.0"How to get libmsquic.soI will paste a link to pre-built libs, but if you wish to build it yourself, you can use Dockerfile from msquic repo, run it and then copy the libs from the container to local machine. Leveraging local changes to System.Net.Quic.dll or System.Net.Http.dllI would strongly advise against building whole clr+libs by passing ResultsI haven't run for too long (maxExecutionTime=10 minutes) but it was enough for requests to stop going through and just time out - I'd suspect improper stream closure might be the reason. Of all the scenarios, GET Aborted and POST ExpectContinue are the only ones that are not working at all. Other scenarios failures are timeouts that I mentioned before Observed failures
Additional problems
cc @ManickaP @wfurt @geoffkizer
|
| public bool IsCancellationRequested { get; private set; } | ||
|
|
||
| public Version HttpVersion => _config.HttpVersion; | ||
| public Version HttpVersion => _client.DefaultRequestVersion; |
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.
Doesn't this work with the -http config switch? Or am I missing something?
Edit: I see you leave it for the server + ALPN
|
Closing in favor of #55098 |
This is a temporary workaround to run stress tests for HTTP/3 with a pre-built libmsquic.so (until we have proper packaging for Linux).
How to run the tests
Before running, you will need to acquire libmsquic.so and libmsquic.lttng.so and put them to stress dir.
To run the stress for HTTP/3, you need to specify 3.0 on both client and server.
How to get libmsquic.so
I will paste a link to pre-built libs, but if you wish to build it yourself, you can use Dockerfile from msquic repo, run it and then copy the libs from the container to local machine.
It might be helpful to substitute container entrypoint from "/run_endpoint.sh" to "/bin/bash" so the container would not terminate prematurely at the end of the script.
If building docker image on Windows, shell scripts need to be updated from CRLF to LF EOL or they won't work (with a very confusing error "command not found"). From the top of my head it's "scripts/install-powershell-docker.sh", "submodules/openssl/config" and "scripts/run_endpoint.sh".
Leveraging local changes to System.Net.Quic.dll or System.Net.Http.dll
I would strongly advise against building whole clr+libs by passing
-bflag torun-docker-compose.ps1as it takes tons of time. With my updates to Dockerfile, container will already have nightly dotnet build from main. It should be enough to just substitute specific dll -- build it locally for Linux, copy to stress dir and uncomment COPY command. (see Dockerfile)Results
I haven't run for too long (maxExecutionTime=10 minutes) but it was enough for requests to stop going through and just time out - I'd suspect improper stream closure might be the reason.
Of all the scenarios, GET Aborted and POST ExpectContinue are the only ones that are not working at all. Other scenarios failures are timeouts that I mentioned before
Observed failures
System.Exception: Expected status code OK, got InternalServerErrorScenario: POST ExpectContinue
System.Net.Http.HttpRequestException: An error occurred while sending the request.---> System.Net.Quic.QuicStreamAbortedException: Stream aborted by peer (258).Scenario: GET Aborted
System.Net.Http.HttpRequestException: Error while copying content to a stream.---> System.IO.IOException: An error occurred while sending the request.---> System.Net.Http.HttpRequestException: An error occurred while sending the request.---> System.Net.Quic.QuicStreamAbortedException: Stream aborted by peer (258).Scenario: GET Aborted
System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 60 seconds elapsing.---> System.TimeoutException: Read was canceledScenarios: GET, GET Partial, GET Headers, GET Parameters
POST, POST Multipart Data, POST Duplex Dispose, POST ExpectContinue
HEAD
PUT, PUT Slow
GET Slow
System.Exception: Completed unexpectedlyScenario: GET Aborted
System.Net.Http.HttpRequestException: Error while copying content to a stream.---> System.IO.IOException: An error occurred while sending the request.---> System.Net.Http.HttpRequestException: An error occurred while sending the request.---> System.Net.Http.HttpRequestException: The response ended prematurely, with at least X additional bytes expected.Scenario: GET Aborted
System.Net.Http.HttpRequestException: Error while copying content to a stream.---> System.IO.IOException: An error occurred while sending the request.---> System.Net.Http.HttpRequestException: An error occurred while sending the request.---> System.Net.Quic.QuicOperationAbortedException: Operation aborted.Scenario: POST Duplex
Additional problems
cc @ManickaP @wfurt @geoffkizer