-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Solace Scaler: Enhancement to support a hostlist of Solace brokers #6541
base: main
Are you sure you want to change the base?
Solace Scaler: Enhancement to support a hostlist of Solace brokers #6541
Conversation
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: dpochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
…opsky/keda into solace_scaler/hostlist-enhancement
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
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.
Thanks for the contribution! A naive question, what's this for? I mean, which is the use case of multiple brokers?
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
The use case is for Solace deployments with Disaster Recovery (DR) enabled. Solace DR introduces an additional Solace Broker and operates in an active standby mode, so the scaler needs to query two different brokers with different endpoints, verify connectivity status as well as determine which of the brokers are active, once that is deteremined, the scaler operates as it did before. |
Interesting point and rally nice addition! The only thing that I'm not sure is about querying all the brokers all the time (if the 1st one isn't the active, it'll be asked all the time). I think that we should just store which one is the active one and relaying of it. As KEDA will recreate the trigger on errors, if the active broker fails, the scaler will fail and KEDA will recreate it, refreshing the active broker |
I initially planned on maintaining the brokers' state as you suggested, but I was told there isn't a way to maintain state. Despite that I still gave it a try and couldn't figure out how to do it. |
just store it as part of a scaler scoped variable |
ok I'll give that a try, thanks |
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
Signed-off-by: David Pochopsky <[email protected]>
enhancement to track which of the hosts are active has been implemented as requested. |
You're storing the current index, but you're not using it, so each metric request is querying both solace all the time. I meant to store the current broker to just call to that broker only once it's been detected |
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.
Could you please open an issue to describe the intention behind this PR? Then link it here and in the Changelog.
Please also link here the related docs PR.
Shown below is the function that initiates the query to retrieve the broker's status. The 'idx' is computed based off the s.curHostIdx from the previous invocation in the first line of the for loop. Upon a successful check of both getVpnState and getQueueState using 'idx' it will return the results to the calling function prior to completing the for loop. I don't see what you mean about not using the idx or it always querying both brokers. `func (s *SolaceScaler) getSolaceQueueMetricsFromSEMP(ctx context.Context) (SolaceMetricValues, error) {
}` |
Ok I'll open an issue as requested. Here's the PR for the docs: kedacore/keda-docs#1536 |
Signed-off-by: David Pochopsky <[email protected]>
Issue created and added to changelog: #6566 |
…opsky/keda into solace_scaler/hostlist-enhancement
Provide a description of what has been changed
Checklist
Fixes #
Relates to #