Improvements to Load Balancer RPC Node: Adding Country Code and Blockchain Version in the Custom Header

in blurt •  4 years ago  (edited)

The Load Balancer RPC Node: https://steem.justyy.workers.dev acts as a proxy - which stand between the client (you) and a few list of the RPC nodes. It will forward your request to whoever qualifies (alive and shorter pings).

image.png

To see a list of RPC nodes available for STEEM blockchain: https://steemyy.com/node-status.php

Currently, the list of candidate RPC nodes are:

"https://api.justyy.com", (@justyy)
"https://api.steemit.com", (@steemit)
"https://api.steemitdev.com", (@steemit)
"https://api.steem.fans", (@ety001)
"https://steem.61bts.com" (@ety001)

We can add more nodes to it however, as per Cloudflare worker's limit, only maximum 6 requests (pings) will be sent, therefore, adding more nodes will actually degrade the performance - as the additional requests will be queued and this increase the overall latency.

Previously, I have added the Origin custom header which indicates the final RPC server that serves your request. With this update, I have also added the Country code - which is the server place of the Load Balancer (serveless worker). This isn't much useful at the moment, but consider in the future, we have more RPC nodes globally in each regions, we can have a list of candidate nodes for each region respectively - which will greatly improve the users experience.

Also, the Blockchain version data is returned in Custom Header version. So you know the version number of the RPC node that serves you - however this is counted as an additional call, which will slightly increase the latency.

image.png


Every little helps! I hope this helps!

Steem On!~

Computing & Technology

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

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!