-
I have replaced my own proxy middleware with YARP, and now I am experiencing very slow file transfers. Downloading 50 MB takes 120 seconds but when I perform the same test with my old middleware it takes 0.5 seconds. Is it possible that I have configured YARP incorrectly to induce this issue? YARP configured as a forwarder in code: public void Configure( IApplicationBuilder app, IWebHostEnvironment env, IHttpForwarder _forwarder )
{
httpClient = new HttpMessageInvoker( new SocketsHttpHandler
{
UseProxy = false,
AllowAutoRedirect = false,
AutomaticDecompression = DecompressionMethods.None,
UseCookies = false
} );
requestOptions = new ForwarderRequestConfig { ActivityTimeout = TimeSpan.FromSeconds( 100 ) };
app.Run( async context => {
/* Abbreviated code */
var error = await forwarder.SendAsync( httpContext, resolvedUri.ToString(), httpClient, requestOptions );
} );
} My use case:
Environment:
Any and all ideas are greatly appreciated, thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Can you please provide a few more details:
Before .NET 6, there is a known issue where using HTTP/2 will result in slow data transfers on higher-latency connections. |
Beta Was this translation helpful? Give feedback.
-
Not actionable for YARP at this moment. Marking as answered. |
Beta Was this translation helpful? Give feedback.
Not actionable for YARP at this moment. Marking as answered.