How to increase grpc workers and anycable go concurrency ? #232
Replies: 1 comment
-
Hey!
Yep, it is. We process incoming messages one by one in a blocking manner to natural prevent malforming clients from occupying all the resources. AnyCable is designed for high number of concurrent clients, so the available capacity is meant to be shared across them in a fair manner. One of the reasons for that is the threaded nature of the RPC server. We usually recommend keeping RPC calls as fast as possible (since they're synchronous). If you have some IO work within channels, I'd recommend moving it to background jobs and responding to the client asynchronously (via broadcast). |
Beta Was this translation helpful? Give feedback.
-
I am making my app scalable which has a dashboards feature. This dashboard can create multiple IO-bound requests. So, I am trying to make a new channel for each chart, and then the requests are sent by those chart_channels.
The issue is, anycable concurrency is scoped per connection basis. Is there any ways I can directly use the whole concurrency available for all the incoming requests? as I have to process these requests on priority basis, but they should not affect my Rails Server Threads, and its resources.
and for such if it is possible, I also want to increase the worker and concurrency limit of both the anycable rails service and anycable go service.
Any suggestions for this problem will be really helpful!
Beta Was this translation helpful? Give feedback.
All reactions