question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Grpc Under Load Problem

See original GitHub issue

Hi ,

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:closed
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
davidfowlcommented, Dec 11, 2021

@melfeqy I’d recommend using dotnet counters to get some top level metrics about your applications’ behavior.

0reactions
rafikiassumani-msftcommented, Dec 20, 2021

@melfeqy We will close this issue as we believe we have provided enough guidance to help resolve your problem.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found