Ideas for selecting one remote connection in a list of many #5424
-
Basically looking for ideas on how to create some kind of round robin type selection when connecting to remote servers. In my example we have two remote servers that can do the exact same thing so it would be nice to be able to determine which one is available and maybe even which one might have more load than others. Would be similar to a load balancer just not as complex as one. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Is there a StackStorm context or are you asking about load balancing in general? |
Beta Was this translation helpful? Give feedback.
-
If I understand you correctly, you're not talking about distributing workflow execution across a St2 cluster but to have workflows pick hosts to use for To emulate the notion of a pool with resource consumption in mind, I'd use a service discover system to identify hosts that would be part of the pool. I'd use a graphing system to collect the resource usage of each node in the pool. I'd query these two sources of truth and filter the data with YAQL (or jinja if you prefer) to choose the least loaded host. I recommend depending on external systems because they're built for the specific task in mind and will avoid adding a whole lot of complexity to St2 workflows. |
Beta Was this translation helpful? Give feedback.
-
In the end we decided to put the nodes behind a LB and let it figure out which node to use. Then we implemented polices on on the pack to limit the number of executions as we had over 50 rules all needing to queue at the same time. Still, it would be neat to see some sort of pack that could handle this from StackStorm. I started working on one, but I dont have time to deal with experiential things right now. |
Beta Was this translation helpful? Give feedback.
In the end we decided to put the nodes behind a LB and let it figure out which node to use. Then we implemented polices on on the pack to limit the number of executions as we had over 50 rules all needing to queue at the same time.
Still, it would be neat to see some sort of pack that could handle this from StackStorm. I started working on one, but I dont have time to deal with experiential things right now.