-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new endpoint to expose lag #137
Conversation
Could we add unit tests to |
There seems to be no easy way to test lag_status with unit test since we can't mock Reactor object. Just tested with integration test and works properly. |
## Describe your changes and provide context `seid status` fails for non-validator nodes. It turns out that the check for `ValidatorInfo.Pubkey` here https://github.com/cosmos/cosmos-sdk/blob/main/client/rpc/status.go#L52 isn't in our branch, which causes it to fail with a nil pointer. ## Testing performed to validate your change Verified and tested on rpc node: ``` /home/ubuntu/sei-chain# seid status | jq { "NodeInfo": { "protocol_version": { "p2p": "8", "block": "11", ... ```
Describe your changes and provide context
Problem:
AWS ELB/ALB required health check endpoint to respond a non 200 response to indicate the service is not healthy. This is currently not available for RPC nodes.
Solution:
We will add a new endpoint /lag_status, which will respond a 200 OK when lag is below lag-threshold, and will respond with a non 200 status code when lag is above the lag threshold. In that way, we can easily configure ALB to detect the health of an RPC node
Testing performed to validate your change