grpc Java benchmarks at https://github.com/grpc/grpc-java/blob/master/benchmarks/README.md has some useful pointers (and example code) that you may want to look at.
On Friday, October 6, 2023 at 7:35:00 AM UTC-7 Edvard Fagerholm wrote: > Hi, > > I need to be able to create tens of thousands of simultaneous requests > between a server and a load balancer to load balance millions of concurrent > mobile connections that listen to events using a gRPC stream. > > gRPC docs advocate for sharing stubs (first bullet point here): > > https://grpc.io/docs/guides/performance/ > > Furthermore, we have the quote: > > "Each gRPC channel uses 0 or more HTTP/2 connections and each connection > usually has a limit on the number of concurrent streams" > > Initial load testing showed that the Java client stub with ManagedChannel > always creates one HTTP/2 connection. In our case, we use AWS ALB, which > puts a limit of 128 streams within a HTTP/2 connection. To support e.g. 50k > simultaneous gRPC streams, we therefore need hundreds of clients. > > The easy solution is to just create lots of clients and round-robin > between them, but this requires creating a high number of clients to > accommodate for any spikes. As you pay per active sockets for the load > balancer this is throwing some money away (not much though). > > I was wondering if there are any libraries or free examples with battle > tested code for handling high number of sockets by dynamically increasing > the size of the channel pool as well as dynamically scaling it back? > > Best, > Edvard > > > > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/801ef8fd-7181-41c8-8914-1cb446d4ccbfn%40googlegroups.com.