Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

add option to allow nodeos to refuse/drop HTTP connections if head_block_time is not current #4292

Open
matthewdarwin opened this issue Jun 22, 2018 · 3 comments

Comments

@matthewdarwin
Copy link

matthewdarwin commented Jun 22, 2018

Many block producers run API nodes behind a load balancer. The load balancer will distribute load to multiple nodeos servers. Some nodeos servers might not be up-to-date because they crashed and have to re-sync. In order to not server old data, the server admin should remove the nodeos server from the load balancer until it catches up (or remove the HTTP plugin from config.ini).

It would be easier for server admins, however, if this was automatic.

If there was an option in config.ini such that if nodeos is behind, it will not process requests from HTTP(s) port. This means the load balancer checking script would deem the server "down" and take it out of rotation.

Something like:

# if nodeos is not up-to-date, refuse to handle HTTP transactions.  
# Parameter is number of seconds delay that is acceptable
refuse-connection-when-behind = 5 
@matthewdarwin
Copy link
Author

on https://validate.eosnation.io, I can see many people who's API nodes are running behind. Search for "last block is not up-to-date" in the error report.

@matthewdarwin
Copy link
Author

The head_block_time should come from "chain get info" (as in http://eos-api.privex.io/v1/chain/get_info)

@nsjames
Copy link
Contributor

nsjames commented Jun 23, 2018

This would be fantastic. I've noticed some endpoints who are almost 200k irreversible behind.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants