Skip to content

One AnyCable process at 100% opening websocket connections #137

Answered by palkan
cjamison asked this question in Q&A
Discussion options

You must be logged in to vote

There are other anycable ruby processes but they don't stay pegged at 100% (maybe 5-10%)

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).

Is this an unavoidable bottleneck due to the architecture?

You can scale RPC servers horizontally, see Load balancing docs.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cjamison
Comment options

Answer selected by cjamison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants