Skip to content
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

fix http-push-connection-dispatcher config overrides #2139

Merged

Conversation

alstanchev
Copy link
Contributor

@alstanchev alstanchev commented Mar 4, 2025

properties were not in the right place and the config was defaulting to https://github.com/apache/pekko/blob/2469f729f7503acf814bcbd042b4bb0863103c9d/actor/src/main/resources/reference.conf#L506

Also setting the defaults to some more sensible values so that the threadpool is created with a reasonable size and only grow on demand.

fixes #2138

@alstanchev alstanchev requested a review from thjaeckle March 4, 2025 14:33
@alstanchev alstanchev self-assigned this Mar 4, 2025
Comment on lines 1334 to 1337
core-pool-size-factor = 4
core-pool-size-factor = ${?HTTP_PUSH_CORE_POOL_SIZE_FACTOR}
core-pool-size-max = 64,
core-pool-size-max = ${?HTTP_PUSH_CORE_POOL_SIZE_MAX}
Copy link
Member

Choose a reason for hiding this comment

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

You adjusted the defaults.
The prior defaults seemed not logical to me .. but did you test what effect those configs have with e.g. different load?

Might be worth to add a little documentation for those configurations.

Copy link
Contributor Author

@alstanchev alstanchev Mar 4, 2025

Choose a reason for hiding this comment

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

Prior defaults were not working at all as those properties should be inside "thread-pool-executor" object. If putted in such a threadpool with int.max number of threads was being created.
I did tested with different load and was able to publish more than ~200 m/s an endpoint that responds after 1.5s only by changing the dispatcher settings and parallelism of the connection. Before changing the dispatcher config there were "There are too many in-flight requests." (handled by parallelism) and "Dropped message as result of backpressure strategy!" (handled by tweaking the dispatcher). Maybe the default factor can be left at 3 but i don't see a drawback if set to 4. Nevertheless i don't have a strong opinion on the default value as i will be overriding those later.

Copy link
Member

Choose a reason for hiding this comment

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

Ok.
If you already know you want/need to overwrite them, you could give a hint in the config documentation about how and when to tweak them (e.g. when inspecting certain dispatcher metrics).

But I assume this is highly dependent on the use-case :D

@thjaeckle thjaeckle added this to the 3.7.1 milestone Mar 4, 2025
@thjaeckle thjaeckle added the bug label Mar 4, 2025
Copy link
Member

@thjaeckle thjaeckle left a comment

Choose a reason for hiding this comment

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

Great that you found the root cause 👍

@alstanchev alstanchev force-pushed the bugfix/http-dispatcher-config branch from 565a860 to 864cf82 Compare March 5, 2025 09:55
@alstanchev alstanchev merged commit 179bb35 into eclipse-ditto:master Mar 5, 2025
3 checks passed
@alstanchev alstanchev deleted the bugfix/http-dispatcher-config branch March 5, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

http push connection issues with slow target endpoints
2 participants