para
para copied to clipboard
Add custom health check properties
If Para uses the DropWizard health check, we can open up the opportunity to implement custom health check properties that layer in on top of the existing ones that Para uses. Para would register a root HealthCheckRegistry, and then we can expose a way for external code to add new properties. This would allow a custom DAO plugin, for example, to implement more sophisticated health check measures if desired.
Sounds good. The easiest of way to do this is to load HealthCheckerAddon implementations through ServiceLoader and execute them one by one after the standard checks in HealthUtils. The interface could be:
public interface HealthCheckerAddon {
public boolean performAdditionalHealthCheck();
}
And if one of the loaded external checks returns false the system would become unhealthy.