GRPC Streaming and gevent: Each channel needs native thread and leads to overflow

57 views
Skip to first unread message

Aleh Strakachuk

unread,
Sep 14, 2023, 11:16:38 AM9/14/23
to grpc.io
Hellol

I'm using python and locust to load test grpc endpoints. I also need to hold stream connection in addition to unary grpc calls.

So, as I see in the current implementation, it was made in
https://github.com/grpc/grpc/pull/28863

# Currently, each channel corresponds to a single native thread in the
# gevent threadpool. Thus, when the unit test suite spins up hundreds of
# channels concurrently, some will be starved out, causing the test to
# increase in duration. We increase the max size here so this does not
# happen.
```

I need to increase threadpool.maxsize variable to thousands in order to make it possible to hold stream connection by thousands users. User ~ threads count.

Is it possible to make that one native thread will process many channels at once?


Reply all
Reply to author
Forward
0 new messages