FluentHttpClient icon indicating copy to clipboard operation
FluentHttpClient copied to clipboard

During concurrency, requests are unusually slow

Open murongqingsi opened this issue 5 months ago • 3 comments

I created an API, and the logic within this API requires calling a third-party interface to obtain data. However, when using JMeter for stress testing, the concurrency is only in the single digits or a dozen. It can't even reach 50, which indicates poor performance. If I directly call the third-party interface, the concurrency is very high. What could be the reason for this?

murongqingsi avatar Sep 21 '25 04:09 murongqingsi

I deleted my previous comment, as it did not pertain to this library. Sorry for the confusion.

Jericho avatar Sep 21 '25 13:09 Jericho

Hi! Have you tried comparing the performance when using FluentHttpClient vs the built-in HttpClient?

If you see the same performance drop with the built-in HttpClient, it's not an issue with this library itself. In high-performance scenarios, make sure you apply Microsoft's HttpClient guidelines (especially reusing HttpClient instances and/or using IHttpClientFactory). That can make a big difference in the performance you'll see under heavy load.

Pathoschild avatar Sep 25 '25 22:09 Pathoschild

Hello, I have used FluentFHIR before and it works the same way with its default settings. However, using the official IHttpClientFactory will result in higher performance. Then I tried using Python for HTTP requests and found that Python's performance is much higher.

murongqingsi avatar Oct 03 '25 14:10 murongqingsi