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

Question: Can the pm2-autoscale settings be set via the ecosystem configuration file (e.g. per-application)? #4

Closed
hostalp opened this issue Aug 1, 2024 · 5 comments

Comments

@hostalp
Copy link

hostalp commented Aug 1, 2024

We're currently evaluating the possibilities to auto-scale NodeJS applications and have found this module to be potentially suitable.
However the documentation (as well at the more complete article https://vexell.medium.com/autoscale-node-js-applications-with-pm2-and-pm2-autoscale-module-3129582dc72c) appears to mention the possibility to apply the auto-scaling settings (scale_cpu_threshold, release_cpu_threshold) only globally.

We'd like to be able to set these per-application so that different applications can use different settings. Is it (or will it be) possible?

There are some workarounds that come to our minds, however we'd really prefer the straightforward approach - just setting these parameters in the .config.js file or so.

@VeXell
Copy link
Owner

VeXell commented Aug 2, 2024

Hello @hostalp Thank you for you message. Yes, this is a good point. I guess the best place for that might be ecosystem config file. I will think how i can get access for that in the module (if it possible to use custom properties).

@VeXell
Copy link
Owner

VeXell commented Aug 8, 2024

Hello @hostalp

Have a look on the pull request and readme file #5
Does it work for you?

It allows you to change settings per app with providing env string

@VeXell
Copy link
Owner

VeXell commented Aug 8, 2024

Merged to main and published with new version 1.3.1

@hostalp
Copy link
Author

hostalp commented Aug 8, 2024

Yes this looks good. 👍

@hostalp hostalp closed this as completed Aug 8, 2024
@VeXell
Copy link
Owner

VeXell commented Aug 9, 2024

@hostalp Thank you. I will appreciate if you star my repo.

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

No branches or pull requests

2 participants