Steem Load Balancer May Return Inconsistent Result

in #steem12 days ago

I have fixed a bug yesterday to steem load balancer. The error was caused by treating the JSON body as raw text if the header "Content-type: application/json" is not set e.g. in the curl command. The forwarded POST request will cause steemd to complain with "Invalid Request" Error.

I've done a test:

for i in {1..10}; do curl -k -s -m 5 --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_count", "params":[], "id":1}' https://steem.justyy.com; echo -e "\m"sleep 1; done;

As shown below, it returns 3.6M accounts 3 out of 10.

image.png

This is due to that the official nodes were chosen 3 times. The Steem Load Balancer does not check the results after forwarding the request to the fastest node (smallest latency). However, we might be able to validate the result at that point.

Steem to the Moon🚀!