Choose a "stable" RPC node in your Steem App by using the Load Balancer Node
As you may know, I’ve set up two Steem Load Balancer RPC nodes:
- https://api.steemyy.com (London)
- https://steem.justyy.com (New York)
The project is open source, so you can easily deploy your own instance if needed:
https://github.com/doctorlai/steem-load-balancer
Using the Load Balancer in Your Steem App
Instead of hardcoding a single RPC node, you can select the most stable one dynamically through the Load Balancer.
For example, you can query the Load Balancer with a simple GET request, then parse the __server__
field:
curl -s "https://steem.justyy.com/" | jq .server
"https://api.justyy.com"
This response gives you the fastest responding RPC node at that moment.
Example: Dynamic RPC Node Selection with Fallback
node = fetch_from_load_balancer("https://api.steemyy.com")
while your_app_is_running:
try:
# use the node in your API calls
pass
except:
# if the node fails, refresh it from the load balancer
node = fetch_from_load_balancer("https://api.steemyy.com")
With this setup, your app will:
- Always start with a healthy RPC node
- Automatically switch to a new one if the current node fails
This approach provides better stability and resilience compared to relying on a single hardcoded RPC endpoint.
Steem to the Moon🚀!
- You can rent Steem Power via rentsp!
- You can swap the TRON:TRX/USDT/USDD to STEEM via tron2steem!
- You can swap the STEEM/SBD to SUI via steem2sui!
- You can swap the STEEM/SBD to SOL Solana via steem2sol!
- You can swap the STEEM/SBD to ETH Ethereum via steem2eth!
- You can swap the STEEM/SBD to Tether USDT (TRC-20) via steem2usdt!
- You can swap the STEEM/SBD to TRX (TRON) via steem2trx!
- You can swap the STEEM/SBD to BTS (BitShares) via steem2bts!
- Register a free STEEM account at SteemYY!
- Steem Block Explorer
- ChatGPT/Steem Integration: You can type !ask command to invoke ChatGPT
- Steem Witness Table and API
- Other Steem Tools
XMSL, Dr. Lai.