Steem Load Balancer: Adding Negative Tests
I've pushed a commit to add some negative tests:
## This tests the load balancer by sending a GET request with header to the server and checking the response
## which should be a 500 error because all requests should be failed: No valid node found
## curl -s -H "Content-type:application/json" https://api.steemyy.com | jq
send_a_get_request_header_when_all_nodes_are_down() {
## send a GET request
## curl -s https://api.steemyy.com | jq
resp_status_code=$(curl -m 5 -o /dev/null -s -w "%{http_code}\n" http://127.0.0.1:443/)
if [ "$resp_status_code" != "500" ]; then
echo "send_a_get_request_header failed with http response code: $resp_status_code"
return 1
fi
echo "send_a_get_request_header_when_all_nodes_are_down passed! (response code: $resp_status_code)"
return 0
}
You can now supply a config in ./run.sh
for example:
I've also pushed a latest image to justyy/steem-load-balancer:latest
so you can do:
docker pull justyy/steem-load-balancer:latest
HOST_PORT=443
RETRY_COUNT=3
docker run \
-e NODE_ENV=production \
-e SSL_CERT_PATH=$SSL_CERT_PATH \
-e SSL_KEY_PATH=$SSL_KEY_PATH \
--name steem-load-balancer \
--restart on-failure:$RETRY_COUNT \
-p $HOST_PORT:8080 \
-v /root/.acme.sh/:/root/.acme.sh/ \
justyy/steem-load-balancer:latest
The two load balancers are now updated with the latest software:
- https://steem.justyy.com (USA)
- https://api.steemyy.com (London)
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