Healthchecker is a reusable React component that helps your apps select the best node to connect to. It can be used by developers in their applications to handle dynamic node changes based on defined criteria.

Why is the Healthchecker so useful?
Hive applications rely on a network of API nodes. Each node performs specific tasks depending on its configuration. Applications that send and receive data connect to one of the API nodes.
If you, as a developer, want to use the Healthchecker in your application, you can configure:
- a predefined list of API nodes
- collection of validators for API's methods.
- current endpoint in use and a function to change it.
If a user has a problem with your application, it seems “broken”, the user can check the status of API nodes and APIs and switch to a better API node.
So the Healthchecker helps your users to control which API node they are connected to and switch the node based on your criteria.
How does the Healthchecker check the quality of the node?
The Healthchecker sends simple and fast API call requests, defined by you, to a node. Based on the results, the Healthchecker evaluates whether a node responds and how quickly it does so.
So the Healthchecker checks:
- Availability - whether the node responds or returns errors
- Latency - the response time measured in milliseconds
- Reliability trend - Whether it has been operating stably in the last few minutes.
Based on the above parameters, the Healthchecker scores the nodes and chooses the best node.
You can choose the validators that your application needs to be checked by.
How is the Healthchecker implemented?
Like most of our applications, the Healthchecker UI component is built using a Wax library and referencing the actual implementation of underlying Healthchecker class:
https://hive.pages.syncad.com/wax-doc/default/
https://gitlab.syncad.com/hive/wax
Wax handles the API requests and provides all the necessary information for display.
For styling, we use the Tailwind framework.
You can find the full documentation and source code here:
https://gitlab.syncad.com/hive/healthchecker-component
How do we use Healthchecker?
As you may know, we are working on Denser, a new version of Condenser used by hive.blog. On Denser (please keep in mind it is not full production-ready), you can see how the Healthchecker works.

As you can see there is a list of API nodes predefined by developers. But a user can add their own API node using the controls on the button on the page.
Under the API node URL, there is a list of APIs, you can see that four APIs are checked: get accounts, get post, list communities and get ranked posts. The list is predefined by given application developers (integrating Healthchecker component) and cannot be changed by an end user. There is also a check icon that indicates the API node is functional.
On the right hand-side there is information about Latency and Score and a button that allows you to change your node.
Above the list, there is a switch labeled 'Continuous Check`. If it is on, the API nodes are evaluated automatically at predefined intervals, which allows them to gather statistics and select the best node in a much better, more reliable way . Although you should consider using this option when you are on a metered connection - that’s why we decided to implement an option to control this feature. Below, there is a button 'Switch to Best', after pressing it, the Healthchecker automatically selects the best possible API provider endpoint.