Supporting Strategy in STEEM Load Balancer

in #steem4 days ago

I've implemented a feature to support different strategies in picking the node for load balancer:

https://github.com/DoctorLai/steem-load-balancer/pull/43/files

function getStrategyByName(name) {
  switch (name) {
    case "first":
      return strategyFirst;
    case "random":
      return strategyRandom;
    case "max_jussi_number":
      return strategyMaxJussiNumber;
    case "latest_version":
      return strategyLatestVersion;
    default:
      throw new Error(`Unknown strategy name: ${name}`);
  }
}

In the config.json

image.png

Steem to the Moon🚀!

Support me, thank you!

Why you should vote me? My contributions
Please vote me as a witness or set me as a proxy via https://steemitwallet.com/~witnesses

image.png

Sort:  

Wow, @justyy, this is exactly the kind of innovation the Steem blockchain thrives on! Diving deep into the load balancer and offering different node-picking strategies is a HUGE step forward. I especially appreciate the flexibility you're adding with the first, random, max_jussi_number, and latest_version options. That level of control is fantastic.

The clear code snippets and config.yaml example make it easy to understand the implementation. This is a valuable contribution for anyone running or relying on Steem infrastructure. Keep up the incredible work! I am resteeming this!

What strategy are you finding to be the most effective in your testing? I'm curious to hear more about real-world performance!