servicecomb-pack
servicecomb-pack copied to clipboard
Problem for Saga Load Balance Strategy
Currently, Saga's load balancer will select a fastest 'MessageSender' to send msg from pool.
My problem: At some point, if every Alpha node need take 10 minutes to handle business for some reasons(e.g. network), that means, Saga will handle all following requests by the fastest 'MessageSender' within 10 minutes. So, I think that the performance for Saga's load balancer will get a discount.
Of course, I believe one alpha node can handle many many requests. Just for improving Saga.
Part of code from LoadBalancedClusterMessageSender.java ....
MessageSender messageSender = fastestSender();
try {
long startTime = System.nanoTime();
AlphaResponse response = messageSender.send(event);
senders.put(messageSender, System.nanoTime() - startTime);
return response;
} catch (OmegaException e) {
throw e;
}
Please point them out when I make some mistakes. Thank you.
We should support to apply different strategy on the LoadBalancer. Please feel free to create a JIRA for it. It could be great if you can submit a PR for it.
How to apply different strategies on the Load Balancer? Probably, I have not an in-depth study on it. Please give me some hints. Thank you! BTW, follow your advice, I created a JIRA for it.
Please point them out when I make some mistakes. Thank you!
Hi Jiang!
I upgraded the Saga program(even though an informality version) and I read the source of 'LoadBalancedClusterMessageSender.java'. And I thought it was almost same between the last source and the former in terms of function. How do you think? Or I probably located a wrong position?
By the way, why did you downgrade the JDK version for latest Saga?
issue url: https://github.com/apache/incubator-servicecomb-saga/issues/222
@Gannalyo , as the user could use JDK7, we change the code of Omega to support JDK7.