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

Add support to specify custom http timeout only for RabbitMQ Scaler #2053

Closed
JorTurFer opened this issue Aug 24, 2021 · 4 comments · Fixed by kedacore/keda-docs#523 or #2086
Closed
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@JorTurFer
Copy link
Member

Proposal

My proposal is to add the support to specify a specific timeout to use for each trigger when you are using RabbitMQ Scaler.
It could be something like this:

triggers:
- type: rabbitmq
  metadata:
    host: amqp://localhost:5672/vhost # Optional. If not specified, it must be done by using TriggerAuthentication.
    ...
    httpTimeout: 10000 

In cases where it's not defined, KEDA_HTTP_DEFAULT_TIMEOUT should be used

Use-Case

When you are using http protocol with regex, it could need more time than KEDA_HTTP_DEFAULT_TIMEOUT to get the response. It's possible to customize the timeout but only as a global customization. This could be enough in some cases but if you are using KEDA in several not related workloads, this could be a problem.

In our use case, our production RabbitMQ cluster has more than 1k queues, and it needs 5-10 in some cases to response with the queues which match the regex. If we want to use other scale, we would like to avoid having 15-30sec (arbitrary value) in other scalers which uses HTTP protocol

Anything else?

I can do it :)

@JorTurFer JorTurFer added feature-request All issues for new features that have not been committed to needs-discussion labels Aug 24, 2021
@tomkerkhove
Copy link
Member

Is there any reason why the http prefix would be required? Other protocols don''t support this?

@JorTurFer
Copy link
Member Author

JorTurFer commented Aug 24, 2021

I don't know if AMQ client supports it, if it supports, the key can be timeout directly instead httpTimeout
I will take a look during the task if you agree :)

@JorTurFer
Copy link
Member Author

I have taken a look at this and in theory it's possible to set the timeout in amqp connection, but probably it's unnecessary because the default timeout using amqp is 30 seconds instead KEDA_HTTP_DEFAULT_TIMEOUT (3s as default).
It could be totally enough for amqp purposes.
I'm not sure if this option is useful in amqp scenarios 😪
WDYT?

@tomkerkhove
Copy link
Member

It's ok to keep as-is then for me, thanks for checking.

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
Projects
None yet
2 participants