Grpc Under Load Problem
See original GitHub issueHi ,
I’m using grpc client streaming with .Net 5 and i need to handle 1000 simultaneous request and each request should take 50 milliseconds.
currently when i send 1000 simultaneous request it took 9 seconds to be handled and each request takes about 7 seconds(average).
Machine specs
- Windows Server 2019
- 32 GB RAM
- 16 Core
Channel Configuration
var channel = GrpcChannel.ForAddress(ServiceUrl, new GrpcChannelOptions
{
HttpHandler = new SocketsHttpHandler
{
EnableMultipleHttp2Connections = true,
MaxConnectionsPerServer = 1000
}
});
Kestrel Configuration
webBuilder.ConfigureKestrel((context, options) =>
{
var port = context.Configuration.GetSection("HostPort").Get<int>();
options.ListenAnyIP(port, o => o.Protocols = HttpProtocols.Http2);
options.Limits.Http2.MaxStreamsPerConnection = 1000;
});
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Performance Best Practices
Applications with high load or long-lived streaming RPCs might see performance issues because of this queueing.
Read more >gRPC-java server delay in processing request and sending ...
I am running a performance test on my unary gRPC server using GHZ, under load about 100K request the response time is high(about...
Read more >Challenges of running gRPC services in production (part 2)
A major issue when running gRPC in production is load balancing. This happens due to the persistent nature of connections (it uses HTTP/2)....
Read more >Challenges of running gRPC services in production
Unbalanced traffic on the client-to-proxy link later proved to be problematic. Overloaded proxy instances could add too much latency, or even ...
Read more >Why load balancing gRPC is tricky? - Majid Fatemian
But gRPC connections are sticky. In fact they are too sticky that make the load balancing very tricky and difficult.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@melfeqy I’d recommend using dotnet counters to get some top level metrics about your applications’ behavior.
@melfeqy We will close this issue as we believe we have provided enough guidance to help resolve your problem.