-
Notifications
You must be signed in to change notification settings - Fork 1
Improve puma performance. #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
|
this would be awesome, an unwanted request/comment; have you thought about changing the name of the flag to be more generic? (instead of "web", or ad another mode like "console"); what I'm thinking is that "rails c" also initializes 'event source' and converts itself into another "worker" (it also takes more time to boot). If we merge it as it is we can do it via |
Main thing here is we do want to start these in console and dev mode. When running Puma in production is really the only time we don't want to start them. Web seemed like the right name for me, but other than that we could call it whatever. |
|
I have updated the flag to be named 'publisher' as it is not only in the Puma or 'web' context that we desire this behaviour. We want it when legacy ACAPI listeners run, as well as an any kind of batch run. |
226f1e9 to
5cfb423
Compare
5cfb423 to
c11aa03
Compare
ae7203a to
e9ef3d1
Compare
kristinmerbach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| def server_key=(value) | ||
| @server_key = value&.to_sym | ||
| end | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a comment to just block the merge until we finalize the date we want to merge.
|
I'm likely to close this and submit it in a different form. I don't care for how I've chosen nor am enforcing some of the defaults - I think it clashes with both the current implementation and expected deployment, development, and testing defaults of event source. |
After examination, we've discovered that Puma instance (i.e. user-facing web-UI) responsiveness suffers significantly when the system is under heavy asynchronous load (such as during redeterminations).
The reason behind this is that the event source AMQP subscribers are also started on the Puma webserver instances, instead of only on listener instances. This results in AMQP subscribers consuming messages, doing work, and 'stealing' resources from the Puma webserver threads on the same instance.
This update enables a DevOps engineer to opt-in to the creation of asynchronous AMQP subscribers by setting an environment variable
ES_HOSTING_MODEto a value oflistener. Only when this environment variable is explicitly set, and only when it is explicitly set to the value oflistener, will AMQP subscribers be created.Important to note is: