Load Balancing CloudFlare Worker Unlimited Requests Statistics To-date

I have enabled the CloudFlare Unlimited Worker last week, and this gives the generous 50ms CPU cycle for request, and 10Million Request monthly. On average, 0.33 Million (330K) requests quota every day.

image.png

image.png

Mainly the Load Balancing Node spends time in pinging the candidate RPC nodes that is the fetch - which does not cost the CPU time.

However, as CF limits maximum 6 requests at a time, that is only 6 simutaneous pings will be done and the rest will be put in the queue. But that is good enough for now.

I’ll keep monitoring the performance and keep optimising the Node.

For the node performance, please visit https://steemyy.com/node-status.php


Every little helps! I hope this helps!

Steem On!~

Computing and 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

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘Load Balancing CloudFlare Worker Unlimited Requests Statistics To-date’

Showing `Awaiting Email Activation` on Account Registration Page

I have added the following - showing the list of masked email address on the account registration page:
https://steemyy.com/reg.php

image.png

I have recently identified an account registration that the email fails to send - and thus, it would be nice to keep an eye on the list in case you are awaiting emails.

If you register an account, but fail somehow in the process, you can contact me via justyy AT zoho.com or send me a message on steem blockchain.

The emails will never be discloused and are only used later in case of Account Recovery - to prove the ownership of the accounts.


Every little helps! I hope this helps!

Steem On!~

Computing and 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

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘Showing Awaiting Email Activation on Account Registration Page’

A little Insight on the Steem Load Balancing RPC Node

A few days ago, I launched the “Load Balancing” Node: https://steem.justyy.workers.dev

It is a Javascript code that runs on the CloudFlare edges (more than 200 network centers). The network is the computing. When requests are received, the Node will send a ‘ping’ request to a few nodes, and whoever returns first win the request.

See this on the CloudFlare worker debugging console - the remote virtual debugger.

image.png

But all those work are behind the scenes. The user will not see these details, and the Load Balancer is just working fine - and it indicates the actual Node that served the requests via the Response’ custom header origin

image.png


Every little helps! I hope this helps!

Steem On!~

Reposted to Computing and 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

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘A little Insight on the Steem Load Balancing RPC Node’

How Many Zero-Transaction Blocks?

When SteemMonster moved away from Steem, I noticed that the number of transactions in a block has been drastically reduced.

That is not good, the number of transactions shows the activity on the steem blockchain, in a way indicates how popular our chain is.

With a little help, I am able to see how many blocks are having zero transactions in the last 24 hours, 7 days, and 2 weeks.

1
2
3
4
5
6
select count(1) from witnessblocks where number=0 and time>=datetime("now", "-1 day");
select count(1) from witnessblocks where number=0 and time>=datetime("now", "-7 day");
select count(1) from witnessblocks where number=0 and time>=datetime("now", "-14 day");
select count(1) from witnessblocks where number>0 and time>=datetime("now", "-1 day");
select count(1) from witnessblocks where number>0 and time>=datetime("now", "-7 day");
select count(1) from witnessblocks where number>0 and time>=datetime("now", "-14 day");

Results

Zero-transactions blocks (24 hours): 263/28257=0.9%
Zero-transactions blocks (7 days): 2000/197666=1.01%
Zero-transactions blocks (14 days): 3425/367386=0.93%

On average, there are 0.9% to 1% per day blocks are containing zero transactions. More investigations can be done once the blocks are fully re-played.


Every little helps! I hope this helps!

Steem On!~

Computing and 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

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘How Many Zero-Transaction Blocks?’

Updating the CoinTools Chrome Extension

CoinTool is a Chrome Extension that I developed long time ago, which can be installed at:

https://chrome.google.com/webstore/detail/coin-tools/fmglcggbdcbkpkfapngjobfeakehpcgj

However, I have not updated for ages, and since the coinmarketcap is no longer working (requires paid subscription), I have decided to make some changes to at lease replace the coin price lookup with coingecko

Merging this PR, and the update has been pushed to the Chrome Webstore.
https://github.com/DoctorLai/CoinTools/pull/21/files

However, some features are still not working, for now, I don’t have much time - and contributions are welcome!

image.png


Every little helps! I hope this helps!

Steem On!~

Reposted to Computing and 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

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘Updating the CoinTools Chrome Extension’

Testing Load Balance Node

In Python, we can use _threading to launch a thread easily using the _thread.start_new_thread procedure. For example,

1
2
3
4
5
6
7
import _thread

def thread_proc(threadId, value):
print(threadId, value)

_thread.start_new_thread( thread_proc, ("Thread-1", "a Number") )
_thread.start_new_thread( thread_proc, ("Thread-2", "a Number") )

Unfortunately, the above threads may not finish (and be aborted) before the main script is terminated. Because we are not synchronize the threads yet. We can however, do an easy trick:

1
2
while True:
pass

This endless loop will allow all threads to forcibly joining but the script hangs until we Ctrl+C or kill it. We can use the threading module but that requires us to write a Thread class that inherits the threading.Thread.

We can uset the threading.Event() to join the threads. For example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import _thread
import threading

def thread_proc(evt, threadId, value):
evt.set()
print(threadId, value)

evt1 = threading.Event()
evt2 = threading.Event()

_thread.start_new_thread( thread_proc, (evt1, "Thread-1", "a Number") )
_thread.start_new_thread( thread_proc, (evt2, "Thread-2", "a Number") )

evt1.wait()
evt2.wait()

Multithreading Requests to API Server using Python’s _threading Module


Let’s launch 100 threads that sends concurrent requests to a the Load Balancer Node https://steem.justyy.workers.dev. And we need to store the threading.Event() in an array so that we can join all threads.

import _thread
import threading
import json
import requests
from random import randrange

def worker(evt, threadName, block):
  data = {"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[block], "id":1}
  r = requests.post(url="https://steem.justyy.workers.dev",json=data)
  rjson = r.json()
  result = rjson["result"]
  print(threadName, len(result["transactions"]))
  evt.set()

try:
  threads = []
  for i in range(100):
    evt = threading.Event()
    threads.append(evt)
    _thread.start_new_thread( worker, (evt, "Thead-" + str(i), randrange(1, 40000000)) )
  for i in threads:
    i.wait()
except:
  print("Error2")

As expected, it will show the following:

image.png

I have also tried other nodes, and the result seems to me that all nodes can handle multiple requests at the same time from the same origin.


Every little helps! I hope this helps!

Steem On!~

Reposted to Computing and 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

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘Testing Load Balance Node’

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×