-
Thank you for this great library! We have been using AnyCable successfully and I was testing the limits using Apache jMeter. We are using a server with 16 vCPUs. The test simulation signs into our system and then initiates a websocket connection. Doing a simulation of 5,000 users, we noticed that during the Websocket Open Connection phase, one process running Here is my question. Is this an unavoidable bottleneck due to the architecture? Or, is there some way to address it? Right now, everything is running on one server and we are currently running anycable (1.0.2) and anycable-rails (1.0.5) on Ruby 2.7.4. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
One instance of AnyCable RPC uses a single Ruby process (not sure about the underlying C extension server implementation; likely, it's multi-core, and other low CPU processes explain this). This Ruby process could become a bottleneck if the message rate is extremely high (I guess, that's exactly what happens when you open 5k connection simultaneously). I'd recommend to add a random jitter to the script to open connections (which would be more realistic).
You can scale RPC servers horizontally, see Load balancing docs. |
Beta Was this translation helpful? Give feedback.
One instance of AnyCable RPC uses a single Ruby process (not sure about the underlying C extension server implementation; likely, it's multi-core, and other low CPU processes explain this). This Ruby process could become a bottleneck if the message rate is extremely high (I guess, that's exactly what happens when you open 5k connection simultaneously). I'd recommend to add a random jitter to the script to open connections (which would be more realistic).
You can scale RPC servers horizontally, see Load balancing docs.