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

Ensure that all query based scalers handles multiple triggers correctly #1473

Closed
zroubalik opened this issue Jan 4, 2021 · 2 comments
Closed
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale All issues that are marked as stale due to inactivity

Comments

@zroubalik
Copy link
Member

If there are multiple triggers in the ScaledObject, we need to be sure, that metricName used in GetMetricSpecForScaling() for each scaler returns unique metricName for the particualar ScaledObject. Most of the scalers should handle this correctly, as the metricName is usually based on a queue name or similar value. The metricName value should be immutable, eg. should be the same for the whole lifetime of the particular ScaledObject.

Query based scalers could be more problematic, because there's not an appropriate unique value that can be used as a base for the metricName, the query itself is usually quite long.

Some scalers are trying to handle this by allowing users to specify the metricName value, so they could distiguish the value manually (PostrgreSQL or InfluxDB).

Docs:
https://keda.sh/docs/2.1/scalers/postgresql/
https://keda.sh/docs/2.1/scalers/influxdb/

We should revisit all query based scalers and ensure that they handle this correctly and the same way both in the code and in the docs.
Relevant scalers:

  • prometheus
  • postgresql
  • mysql
  • influxdb
  • mongodb

We might think about how to make this the most convenient for users as it could be, eg. try to find a solution without a need for specification of metricName manually, maybe a short hash of the query?

This PR is adding a check, that all metricNames per ScaledObject are unique: #1390

@zroubalik zroubalik added needs-discussion feature-request All issues for new features that have not been committed to labels Jan 4, 2021
@stale
Copy link

stale bot commented Oct 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Oct 14, 2021
@stale
Copy link

stale bot commented Oct 21, 2021

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale All issues that are marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

1 participant