Skip to content

Conversation

@lukebakken
Copy link
Collaborator

@lukebakken lukebakken commented Jul 11, 2018

In the case of high connection churn, code:get_object_code is called multiple times to find the Module:additional_authn_params method for the direct connection type. In the case of a missing module (see rabbitmq/rabbitmq-stomp#125), the code_server process can be overrun with messages while checking the code path. This change caches the result so that future calls to a missing or bad module are not as time consuming

Fixes VESC-888

In the case of high connection churn, code:get_object_code is called multiple times to find the Module:additional_authn_params method for the direct connection type. In the case of a missing module, the code_server process can be overrun with messages while checking the code path. This change caches the result so that future calls to a missing or bad module are not as time consuming

Fixes VESC-888
Copy link
Collaborator

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been running an Erlang pseudo STOMP client that churns through connections at 500-1000 connections/second for about 20 minutes now and the Erlang process count on the node with this change and rabbitmq/rabbitmq-stomp#125 has been stable in the 420-570 process range.

A few questions I had when starting the review:

  • Does this cache any client-specific information? The answer is no, only undef errors are cached to avoid repeated code_server hits (it's the classic Single Overloaded Process per Node kind of issue)
  • Does it cache client credentials? No (see above)
  • Do we expect the cache to really kick in often and consume a lot of memory? No (see above + rabbitmq/rabbitmq-stomp#125)

@michaelklishin michaelklishin merged commit 4b2be40 into master Jul 12, 2018
@michaelklishin michaelklishin deleted the lrb-vesc-888 branch July 12, 2018 01:46
@michaelklishin michaelklishin added this to the 3.7.8 milestone Jul 12, 2018
@lukebakken
Copy link
Collaborator Author

Thanks for the review, and it's very interesting and helpful to know what you were thinking before starting it.

michaelklishin added a commit that referenced this pull request Jul 13, 2018
michaelklishin added a commit that referenced this pull request Jul 13, 2018
References #1640.

(cherry picked from commit ff0fd23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants