I have the following infrastructure: .NET Core 3.1 API, which is hosted in VNet. Inside of VNet we have 8 servers with load balancer + SQL Server + Redis Cache.
We are running the API Load test 1200 operation per second on login operation (which is not a lightweight operation). At this moment the load on all servers is 5-10%. But the problem is we're getting API timeout and Redis timeout issues.
It seems like something is blocking our threads
This is from my Startup.cs (we're trying to play with the value, but no success):
var threadCount = 2000;
ThreadPool.GetMaxThreads(out _, out var completionThreads);
ThreadPool.SetMinThreads(threadCount, completionThreads);
This is from *.csproj file:
<PropertyGroup>
<ThreadPoolMinThreads>315</ThreadPoolMinThreads>
Update1-> Redis issue information is added
Redis error: StackExchange.Redis.RedisTimeoutException: Timeout awaiting response (outbound=0KiB, inbound=0KiB, 10008ms elapsed, timeout is 10000ms), command=GET, next: SET key_digievents____freeevent_4072, inst: 0, qu: 0, qs: 684, aw: False, rs: ReadAsync, ws: Idle, in: 2197285, in-pipe: 0, out-pipe: 0, serverEndpoint: 10.0.0.34:6379, mc: 1/1/0, mgr: 10 of 10 available, clientName: akssocial27apiapp-xkkb4, IOCP: (Busy=0,Free=1000,Min=1000,Max=1000), WORKER: (Busy=430,Free=32337,Min=315,Max=32767), v: 2.1.58.34321 StackExchange.Redis.RedisTimeoutException: Timeout awaiting response (outbound=0KiB, inbound=0KiB, 10008ms elapsed, timeout is 10000ms), command=GET, next: SET key_digievents____freeevent_4072, inst: 0, qu: 0, qs: 684, aw: False, rs: ReadAsync, ws: Idle, in: 2197285, in-pipe: 0, out-pipe: 0, serverEndpoint: 10.0.0.34:6379, mc: 1/1/0, mgr: 10 of 10 available, clientName: akssocial27apiapp-xkkb4, IOCP: (Busy=0,Free=1000,Min=1000,Max=1000), WORKER: (Busy=430,Free=32337,Min=315,Max=32767), v: 2.1.58.34321 at Datadog.Trace.ClrProfiler.Integrations.StackExchange.Redis.ConnectionMultiplexer.ExecuteAsyncImplInternal[T](Object multiplexer, Object message, Object processor, Object state, Object server, Func`6 originalMethod)
I will be glad for any advice. Thanks in advance.