Load Balancer Nodes: Improve Success Rates by Checking Jussi Number

in witness-category •  2 days ago 

The Open Source Steem Load Balancer Nodes: https://github.com/DoctorLai/steem-load-balancer

I have deployed/maintained two:

See witness nodes.

Improve Success Rates by Checking Jussi Number

image.png

Previously, the load-balancing algorithm selected the fastest node by sending a get_version request. However, this approach could choose a node that was not yet fully synchronised, as indicated by a jussi_number of 20000000. Then the subsequent forwarded requests may fail.

To address this, the latest updates now verifies the jussi_number and excludes nodes that are significantly behind the latest recorded jussi_number.

See commit

image.png

Additionally, rejectUnauthorized has been enabled to ignore SSL certificate errors by default.

image.png

Statistics

You can simply send a GET to see the statistics of the load balancer node:

// 20250131210049
// https://api.steemyy.com/

{
  "status": "OK",
  "datetime": "2025-01-31T21:00:48.755474",
  "source_commit": "ae6c6c77601436e496a8816ece2cbc6e26fbe3c2",
  "docker_tag": "latest",
  "jussi_num": 92612547,
  "status_code": 200,
  "__server__": "https://api.wherein.io",
  "__version__": {
    "id": 0,
    "jsonrpc": "2.0",
    "result": {
      "blockchain_version": "0.23.0",
      "steem_revision": "5feab9b78d30a37506f252d7c72cfcdc88c34231",
      "fc_revision": "5feab9b78d30a37506f252d7c72cfcdc88c34231"
    }
  },
  "__servers__": [
    "https://api.steememory.com",
    "https://api.justyy.com",
    "https://api2.justyy.com",
    "https://steemapi.boylikegirl.club",
    "https://api.campingclub.me",
    "https://api.wherein.io",
    "https://api.botsteem.com",
    "https://api.steemit.com",
    "https://api.dlike.io",
    "https://api.pennsif.net",
    "https://rpc.amarbangla.net",
    "https://api.steemitdev.com",
    "https://api.moecki.online"
  ],
  "__ip__": "::ffff:",
  "__load_balancer_version__": "2025-01-10",
  "__stats__": {
    "total": 1854,
    "rps": 2.29,
    "rps_stats": {
      "1min": 2.12,
      "5min": 2.82,
      "15min": 2.06
    },
    "seconds": 811,
    "uptime": {
      "startTime": "2025-01-31T20:47:17.232Z",
      "currentTime": "2025-01-31T21:00:48.436Z",
      "seconds": 31,
      "minutes": 13,
      "hours": 0,
      "days": 0,
      "month": 0,
      "year": 0
    },
    "access_counters": {
      "https://api.pennsif.net": {
        "percent": 11.6,
        "count": 215
      },
      "https://api.wherein.io": {
        "percent": 63.38,
        "count": 1175
      },
      "https://api.moecki.online": {
        "percent": 14.35,
        "count": 266
      },
      "https://api.campingclub.me": {
        "percent": 3.67,
        "count": 68
      },
      "https://rpc.amarbangla.net": {
        "percent": 2.27,
        "count": 42
      },
      "https://api.dlike.io": {
        "percent": 2.64,
        "count": 49
      },
      "https://api.steemitdev.com": {
        "percent": 0.27,
        "count": 5
      },
      "https://api.steemit.com": {
        "percent": 0.16,
        "count": 3
      },
      "https://api.justyy.com": {
        "percent": 0.92,
        "count": 17
      },
      "https://api2.justyy.com": {
        "percent": 0.76,
        "count": 14
      }
    },
    "error_counters": {
      
    }
  }
}

Steem to the Moon🚀!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!